Open brollb opened 4 years ago
I know that it sounds odd, but that is how these functions are expected to work. When figuring out inheritance, you should not use getPointerPath (and in general do not use it with 'base' even though it is technically a pointer...). What happens in the first case is that the pointer itself is inherited and therefore the target of the pointer is the original meta type. The second scenario is what you would expect as it takes implicit inheritance relationships into account.
I will not close the issue (just put it in the enhancement bucket) as it would probably worth to revisit getPointerPath + 'base' scenarios and either throwing exception or enhancing its behavior...
When getting the base of a node implicitly created (structural inheritance),
getPointerPath
gets the original meta type (not the path of the corresponding node contained in the parent's base) whereascore.getPath(core.getBase(node))
returns the expected path.