Skip to content

Commit

Permalink
GROOVY-11451: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Oct 5, 2024
1 parent b1d9cac commit 8873fa5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/groovy/transform/stc/ConstructorsSTCTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,13 @@ class ConstructorsSTCTest extends StaticTypeCheckingTestCase {
'''
}

// GROOVY-11451
void testMapStyleConstructorWithOverloadedSetterName2() {
assertScript """import ${Pojo11451.canonicalName}
new Pojo11451(id:'xyz')
"""
}

// GROOVY-11122
void testMapStyleInnerClassConstructorWithinClosure() {
assertScript '''
Expand Down
8 changes: 8 additions & 0 deletions src/test/groovy/transform/stc/Pojo11451.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package groovy.transform.stc;

import java.util.UUID;

public class Pojo11451 {
public void setId(String s) { System.out.print(s); }
public void setId(UUID uid) { System.err.print(uid); }
}

0 comments on commit 8873fa5

Please sign in to comment.