changeset 18379 | 8dd20756448c |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/tools/javac/foreach/7139681/T7139681neg.java Thu Jun 06 15:32:41 2013 +0100 @@ -0,0 +1,16 @@ +/* + * @test /nodynamiccopyright/ + * @bug 7139681 + * @summary Enhanced for loop: local variable scope inconsistent with JLS + * + * @compile/fail/ref=T7139681neg.out -XDrawDiagnostics T7139681neg.java + */ +class T7139681neg { + void testArray() { + for (int a : a) { } + } + + void testIterable() { + for (Integer b : b) { } + } +}