-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target type of a static field must be a CtTypeAccess #346
Comments
Here, the problem is: What should returned According to the documentation of this method declared in the We can remove this information when we are in a static context but there is a consequence with this modification: we can't reprint "this" in @monperrus your opinion? |
the only thing is that elements.get(0/1/2) should return the same value for sake of consistency. I'd say null is a good option |
I don't agree with you. Like you got a different target for a field not static ( |
The point is that they should all return the same object because they It's related to the way we refer to classes, so it's also related to #349. I've looked at the code and this point is a mess, to refer to a class we One option is to introduce a clean CtClassReferenceExpression (similar |
Here, the target type must be a |
see test TargetedExpressionTest::testStaticTargets
in https://github.com/monperrus/spoon/tree/target
The text was updated successfully, but these errors were encountered: