The proper check would be fc.feature.eIsProxy to check whether the feature was not resolved. What do you mean by 'It also sees System.out.println'?
How to check whether an XFeatureCall actually refers to something
-
24-06-2022 - |
Vra
When I'm scanning the ast I want to check whether an element of the type XFeatureCall can be resolved.
Concrete example:
val x = 2
val y = x + z
I know that
val y = <XFeatureCall> + <XFeatureCall>
But only the XFeatureCall "z" should give true (when applying the yet to be found predicate I'm searching).
So far I haven't been able to find a pattern. Except that every unresolvable variable satisfies the following condition:
fc means XFeatureCall
fc.feature instanceof JvmVoid && !fc.explicitOperationCall
This however is not good enough. Because it also sees "System.out.println"
Note: I use a TreeIterator that I get from the root AST element
If necessary I will examine how the XbaseCompiler does it but I prefer not to :)
Oplossing
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow