today I experimented with scopes. I have a concept A which holds a reference to an instance of concept B and one of concept C. A itself is a ScopeProvider but only provides a scope for instances of concept B. For concept C it returns null in the getScope(...) method implementation. According to the documentation the engine then searches for more distant ancestors that are ScopeProviders, too. In the ancestor hierarchy there is another ScopeProvider which is able to provide a scope for references to instances of concept C. But there the child parameter in getScope(child,kind) is not, as expected, of concept A but concept X. Instances of X are far ancestors of instances of A, but this should not have any influence, imho. However, I need the exact container of the reference, which means A. Is this a bug or have I misinterpreted anything?
It would be great if anybody has an idea.
Thank you very much in advance,