test/langtools/tools/javac/NameCollision.java
changeset 47216 71c04702a3d5
parent 6150 d055fa8ced62
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/NameCollision.java	Tue Sep 12 19:03:39 2017 +0200
@@ -0,0 +1,14 @@
+/**
+ * @test  /nodynamiccopyright/
+ * @bug 4222327 4785453
+ * @summary Interface names for classes in the same scope should not
+ * cause the compiler to crash.
+ *
+ * @compile/fail/ref=NameCollision.out -XDrawDiagnostics NameCollision.java
+ */
+
+// The test fails if the compiler crashes.
+
+public class NameCollision {
+    class Runnable implements Runnable { } // ERROR
+}