Skip to content
Permalink
Browse files
GROOVY-10266: add test case
  • Loading branch information
eric-milles committed May 18, 2022
1 parent 856e6fb commit c4fc2ad994cedbd09e1557147129dde0b10f5ec1
Showing 1 changed file with 20 additions and 0 deletions.
@@ -1345,6 +1345,26 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {
'''
}

// GROOVY-10266
void testDiamondInferrenceFromConstructor30() {
assertScript '''
@groovy.transform.TupleConstructor(defaults=false)
class A<T> {
T t
}
class B<U> {
def m() {
U v = null
U w = new A<>(v).t
String x = ""
String y = new A<>(x).t
}
}
new B<String>().m()
'''
}

// GROOVY-10280
void testTypeArgumentPropagation() {
assertScript '''

0 comments on commit c4fc2ad

Please sign in to comment.