langtools/test/tools/javac/8138840/T8139243.java
changeset 33018 9790ed482dd0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/8138840/T8139243.java	Mon Oct 12 12:24:33 2015 +0100
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8138840 8139243 8139249
+ * @summary Compiler crashes when compiling bitwise operations with illegal operand types
+ *          'void' is erroneously accepted as a possible operand for string concatenation
+ * @compile/fail/ref=T8139243.out -XDrawDiagnostics T8139243.java
+ */
+
+class T8139243 {
+
+    void test(String s) {
+        s += m(); // compile time error
+    }
+
+    void m() { }
+}