This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 6c81047f97 GROOVY-11427: add test case
6c81047f97 is described below

commit 6c81047f978cd1cabc3321fc6ce6d2fcf8a8f023
Author: Eric Milles <eric.mil...@thomsonreuters.com>
AuthorDate: Tue Jun 25 15:10:43 2024 -0500

    GROOVY-11427: add test case
---
 src/test/groovy/transform/stc/BugsSTCTest.groovy | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/test/groovy/transform/stc/BugsSTCTest.groovy 
b/src/test/groovy/transform/stc/BugsSTCTest.groovy
index 1c2260a74d..e39c5d544a 100644
--- a/src/test/groovy/transform/stc/BugsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/BugsSTCTest.groovy
@@ -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)'
+    }
 }

Reply via email to