-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Teach Ycheck to spot references to Java packages #2456
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
Comments
@DarkDimius can you add a bit more context here?
|
The nice way to do it would be to introduce a phase after Pickler that gets rid of all references to packages in Select\Ident's. This phase should have a post-conditions that those trees don't re-appear. |
Thanks. How do we "get rid" of references to Java packages? What should they be replaced with? |
@abeln by replacing all verbose references that include packages by Idents. |
Here's my understanding of what needs to be done:
Is that reasonable? |
Yes 👍
Take the term symbol of the qualifier. Check if it has both flags Package and JavaDefined set. I fou don't check for JavaDefined you can also get package objects. |
Thanks. I took a first stab at this in #2528 |
After typechecking, replace TypeRefs trees of the form Select(p, _) : tpe@TypeRef where p refers to a Java package, by Ident(tpe)
After typechecking, replace TypeRefs trees of the form Select(p, _) : tpe@TypeRef where p refers to a Java package, by Ident(tpe)
Fix #2456: eliminate syntactic references to Java packages
Ycheck should have complained here: #2396 (comment)
but it didn't.
The text was updated successfully, but these errors were encountered: