Skip to content

Commit

Permalink
GROOVY-11427: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Jun 25, 2024
1 parent d2b571d commit 6c81047
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/groovy/transform/stc/BugsSTCTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1008,4 +1008,13 @@ assert o.bar() == 2*o.x
new Outer().test()
'''
}

// GROOVY-11427
void testClassSubscript() {
shouldFailWithMessages '''
Class<String> c = String.class
def x = c[0]
''',
'Cannot find matching method java.lang.Class#getAt(int)'
}
}

0 comments on commit 6c81047

Please sign in to comment.