Skip to content

Commit 6c81047

Browse files
committed
GROOVY-11427: add test case
1 parent d2b571d commit 6c81047

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/groovy/transform/stc/BugsSTCTest.groovy

+9
Original file line numberDiff line numberDiff line change
@@ -1008,4 +1008,13 @@ assert o.bar() == 2*o.x
10081008
new Outer().test()
10091009
'''
10101010
}
1011+
1012+
// GROOVY-11427
1013+
void testClassSubscript() {
1014+
shouldFailWithMessages '''
1015+
Class<String> c = String.class
1016+
def x = c[0]
1017+
''',
1018+
'Cannot find matching method java.lang.Class#getAt(int)'
1019+
}
10111020
}

0 commit comments

Comments
 (0)