test/tools/javac/T5048776.java

Wed, 23 Apr 2008 17:10:03 +0100

author
mcimadamore
date
Wed, 23 Apr 2008 17:10:03 +0100
changeset 33
ec29a1a284ca
parent 1
9a66ca7c79fa
child 611
4172cfff05f0
permissions
-rw-r--r--

6682380: Foreach loop with generics inside finally block crashes javac with -target 1.5
Summary: A missing type-erasure in Lower.java causes the compiler to crash since JDK6
Reviewed-by: jjg

     1 /*
     2  * @test  /nodynamiccopyright/
     3  * @bug 5048776
     4  * @compile/ref=T5048776a.out -XDstdout -XDrawDiagnostics                  T5048776.java
     5  * @compile/ref=T5048776b.out -XDstdout -XDrawDiagnostics -Xlint:all,-path T5048776.java
     6  */
     7 class A1 {
     8     void foo(Object[] args) { }
     9 }
    11 class A1a extends A1 {
    12     void foo(Object... args) { }
    13 }
    15 class A2 {
    16     void foo(Object... args) { }
    17 }
    19 class A2a extends A2 {
    20     void foo(Object[] args) { }
    21 }

mercurial