This is an automated email from the ASF dual-hosted git repository. emilles pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
commit eee9e7b28032fb9ad5a884d55afbb685a657e7d0 Author: Eric Milles <eric.mil...@thomsonreuters.com> AuthorDate: Fri Sep 15 14:58:48 2023 -0500 GROOVY-9155: add test case --- src/test/gls/annotations/AnnotationTest.groovy | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/gls/annotations/AnnotationTest.groovy b/src/test/gls/annotations/AnnotationTest.groovy index 23f71ca0ac..61a4a00013 100644 --- a/src/test/gls/annotations/AnnotationTest.groovy +++ b/src/test/gls/annotations/AnnotationTest.groovy @@ -1001,6 +1001,19 @@ final class AnnotationTest { assert err =~ /Annotation @Tag is not allowed on element TYPE/ } + // GROOVY-9155 + @Test + void testAnnotationOnTypeArgumentType() { + def err = shouldFail shell, '''package p + @Target(TYPE_USE) + @interface Tag {} + + def m(List<@Tag(foo="") String> strings) { + } + ''' + assert err =~ /'foo' is not part of the annotation Tag in @p.Tag/ + } + // GROOVY-8234 @Test void testAnnotationWithRepeatableSupported() {