test/tools/javac/InterfaceInInner.java

Tue, 15 Feb 2011 11:51:04 +0000

author
mcimadamore
date
Tue, 15 Feb 2011 11:51:04 +0000
changeset 878
fa0e4e1916f4
parent 855
afe226180744
child 890
3ab7bb46c5c1
permissions
-rw-r--r--

7017104: improve error reporting for uncaught/undeclared exceptions from try-with-resources
Summary: twr should generate better error message when uncaught exceptions are thrown by implicit call of close() method
Reviewed-by: jjg

     1 /*
     2  * @test  /nodynamiccopyright/
     3  * @bug 4063740
     4  * @summary Interfaces may only be declared in top level classes.
     5  * @author turnidge
     6  *
     7  * @compile/fail/ref=InterfaceInInner.out -XDrawDiagnostics InterfaceInInner.java
     8  */
     9 class InterfaceInInner {
    10     InterfaceInInner() {
    11         class foo {
    12             interface A {
    13             }
    14         }
    15     }
    16 }

mercurial