Skip to content
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

Protected extension method on Object causes NPE in compiler #349

Closed
rsmckinney opened this issue Mar 31, 2022 · 1 comment
Closed

Protected extension method on Object causes NPE in compiler #349

rsmckinney opened this issue Mar 31, 2022 · 1 comment
Labels

Comments

@rsmckinney
Copy link
Member

  • create an extension class on Object with protected extension method foo()
  • call foo from an instance of any object
  • NPE
java: An exception has occurred in the compiler (17.0.2). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com/) after checking the Bug Database (http://bugs.java.com/) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java: java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.code.Symbol$ClassSymbol.isSubClass(com.sun.tools.javac.code.Symbol, com.sun.tools.javac.code.Types)" because "c" is null
java:   at jdk.compiler/com.sun.tools.javac.comp.Lower.accessClass(Lower.java:1086)
java:   at jdk.compiler/com.sun.tools.javac.comp.Lower.accessSymbol(Lower.java:952)
java:   at jdk.compiler/com.sun.tools.javac.comp.Lower.access(Lower.java:1197)
java:   at jdk.compiler/com.sun.tools.javac.comp.Lower.visitSelect(Lower.java:4061)

(report from slack group by Jose Illescas: https://app.slack.com/client/T01385BBDLH/C012W174Z7V/thread/C012W174Z7V-1648578482.551389)

@rsmckinney rsmckinney added the bug label Mar 31, 2022
rsmckinney added a commit that referenced this issue Apr 1, 2022
- support calls to non-public extension methods
@rsmckinney
Copy link
Member Author

fixed provided with release 2022.1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant