langtools/test/tools/javac/8138840/T8139243.java
changeset 33018 9790ed482dd0
equal deleted inserted replaced
32954:7db0663a5e96 33018:9790ed482dd0
       
     1 /*
       
     2  * @test /nodynamiccopyright/
       
     3  * @bug 8138840 8139243 8139249
       
     4  * @summary Compiler crashes when compiling bitwise operations with illegal operand types
       
     5  *          'void' is erroneously accepted as a possible operand for string concatenation
       
     6  * @compile/fail/ref=T8139243.out -XDrawDiagnostics T8139243.java
       
     7  */
       
     8 
       
     9 class T8139243 {
       
    10 
       
    11     void test(String s) {
       
    12         s += m(); // compile time error
       
    13     }
       
    14 
       
    15     void m() { }
       
    16 }