T8139243.java revision 3053:79e637c1e083
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
9class T8139243 {
10
11    void test(String s) {
12        s += m(); // compile time error
13    }
14
15    void m() { }
16}
17