jdk-24/test/langtools/tools/javac/expression/NullAppend2.java

12 lines
239 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4717193
* @summary javac improperly allows null + 1
* @author gafter
* @compile/fail/ref=NullAppend2.out -XDrawDiagnostics NullAppend2.java
2007-12-01 00:00:00 +00:00
*/
class NullAppend2 {{
String s = null + 1;
}}