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
The following commit(s) were added to refs/heads/master by this push:
new 44f98d76fc GROOVY-11743: add test case
44f98d76fc is described below
commit 44f98d76fcfc9af130b4ab8b0b85a3b8d1119c9b
Author: Eric Milles <[email protected]>
AuthorDate: Tue Aug 26 09:17:10 2025 -0500
GROOVY-11743: add test case
---
.../traitx/TraitASTTransformationTest.groovy | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git
a/src/test/groovy/org/codehaus/groovy/transform/traitx/TraitASTTransformationTest.groovy
b/src/test/groovy/org/codehaus/groovy/transform/traitx/TraitASTTransformationTest.groovy
index 53b3c731e6..f1435791e8 100644
---
a/src/test/groovy/org/codehaus/groovy/transform/traitx/TraitASTTransformationTest.groovy
+++
b/src/test/groovy/org/codehaus/groovy/transform/traitx/TraitASTTransformationTest.groovy
@@ -562,6 +562,27 @@ final class TraitASTTransformationTest {
"""
}
+ // GROOVY-11743
+ @CompileModesTest
+ void testTraitWithGenerics5(String mode) {
+ assertScript shell, """
+ $mode
+ trait Impl<T> implements Api<T> {
+ @Override T fun() { null }
+ }
+ $mode
+ trait Api<RT> {
+ abstract RT fun()
+ }
+ $mode
+ void test() {
+ def obj = new Impl<String>() {}
+ assert obj.fun() == null
+ }
+ test()
+ """
+ }
+
@CompileModesTest
void testTraitWithGenericProperty1(String mode) {
assertScript shell, """