test/tools/javac/NameCollision.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/NameCollision.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,14 @@
     1.4 +/**
     1.5 + * @test  /nodynamiccopyright/
     1.6 + * @bug 4222327 4785453
     1.7 + * @summary Interface names for classes in the same scope should not
     1.8 + * cause the compiler to crash.
     1.9 + *
    1.10 + * @compile/fail/ref=NameCollision.out -XDrawDiagnostics NameCollision.java
    1.11 + */
    1.12 +
    1.13 +// The test fails if the compiler crashes.
    1.14 +
    1.15 +public class NameCollision {
    1.16 +    class Runnable implements Runnable { } // ERROR
    1.17 +}

mercurial