-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Bug in CtType#getUsedTypes for types in root package #650
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CtType#getUsedTypes fails with a NPE when invoked for a type declared in the root package (i.e. no package).
The following branch contains a test that exhibits the issue: https://github.com/seintur/spoon/tree/getUsedTypes_rootPackage_bug
The reason why I'm still wondering about a potential fix is that I'd like the contract of CtType#getPackage() to be clarified.
For types in the root package, should CtType#getPackage() return:
Same question, asked differently: What is the condition to check to assess whether a type is defined in the root package or not?
Cheers,
Lionel.
The text was updated successfully, but these errors were encountered: