Duck Typing [message #1839091] |
Sat, 13 March 2021 10:08 |
Alfredo Aldundi Messages: 38 Registered: July 2009 |
Member |
|
|
I have a language that requires duck typing.
interface Itf {
attrFromInterface
}
type A implements Itf {
attrFromType
}
So given a reference of type "Itf" the attribute attrFromType shall also be visible.
I know how to access the index, but in the index there is not enough information to know who implements this interface Itf.
The question is: how do I solve this? Loading all the types in the scope provider seems to be a bit heavy (though it would not kill us in our use case as we don't have that many types). However, I have seen that the IEObjectDescription have the possibility to attach "user data". Would that be a sensible approach to attach the implemented interface in the IEObjectDescription for all the types?
|
|
|
Powered by
FUDForum. Page generated in 0.03404 seconds