On Mon, 5 May 2025 09:40:16 GMT, Yudi Zheng <yzh...@openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   changes to test
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java line 669:
> 
>> 667: 
>> 668:     public boolean isValueBased() {
>> 669:         return (tsym.flags_field & VALUE_BASED) != 0;
> 
> We have encountered a NPE in javac:
> 
>   java.lang.NullPointerException: Cannot read field "flags_field" because 
> "this.tsym" is null
>       at 
> jdk.compiler/com.sun.tools.javac.code.Type.isValueBased(Type.java:669)
>       at 
> jdk.compiler/com.sun.tools.javac.comp.Check.checkRequiresIdentity(Check.java:5739)
>       at 
> jdk.compiler/com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:2918)
>       at 
> jdk.compiler/com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1915)
> ...
> 
> It looks like `tsym` can be null 
> https://github.com/openjdk/jdk/blob/60f1f53b18d065f110936e71b7430d7e365881d4/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java#L517-L519

thanks for the report I will update the PR

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24746#discussion_r2073595845

Reply via email to