hg: jdk/sandbox: 8191834: Assigning a void expression to a "var" crashes the compiler

chris.hegarty at oracle.com chris.hegarty at oracle.com
Fri Nov 24 16:33:46 UTC 2017


Changeset: 6373d9a0ad82
Author:    mcimadamore
Date:      2017-11-24 16:14 +0000
URL:       http://hg.openjdk.java.net/jdk/sandbox/rev/6373d9a0ad82

8191834: Assigning a void expression to a "var" crashes the compiler
Summary: local variable type inference should give error on void initializers
Reviewed-by: sundar

! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
+ test/langtools/tools/javac/diags/examples/LocalCantInferVoid.java
! test/langtools/tools/javac/lvti/BadLocalVarInferenceTest.java
! test/langtools/tools/javac/lvti/BadLocalVarInferenceTest.out



More information about the jdk-sandbox-changes mailing list