Mon, 08 Apr 2013 15:53:08 +0100
8010404: Lambda debugging: redundant LineNumberTable entry for lambda capture
Summary: Ignore indy entries in LineNumberTable
Reviewed-by: jjg
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 4074421 4277278 4785453
4 * @summary Verify that a local class cannot be redefined within its scope.
5 * @author William Maddox (maddox)
6 *
7 * @compile/fail/ref=LocalClasses_2.out -XDrawDiagnostics LocalClasses_2.java
8 */
10 class LocalClasses_2 {
12 void foo() {
13 class Local { }
14 {
15 class Local { } // ERROR
16 }
17 }
19 void bar() {
21 class Local { }
23 class Baz {
24 void quux() {
25 class Local { } // OK
26 }
27 }
29 class Quux {
30 void baz() {
31 class Random {
32 void quem() {
33 class Local { } // OK
34 }
35 }
36 }
37 }
38 }
39 }