You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2022/09/02 23:55:18 UTC
[groovy] branch GROOVY_2_5_X updated: GROOVY-10745: add test case
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
new 12ec506569 GROOVY-10745: add test case
12ec506569 is described below
commit 12ec5065696fe400f4aae1f3412ec022c6d2fad8
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Fri Sep 2 18:49:02 2022 -0500
GROOVY-10745: add test case
---
src/test/groovy/transform/stc/GenericsSTCTest.groovy | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/test/groovy/transform/stc/GenericsSTCTest.groovy b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
index 8afa6db9e0..35a2da9c31 100644
--- a/src/test/groovy/transform/stc/GenericsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
@@ -1193,7 +1193,7 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {
'''
}
- // GROOVY-8409, GROOVY-9915
+ // GROOVY-8409, GROOVY-9915, GROOVY-10745
void testShouldUseMethodGenericType10() {
assertScript '''
interface OngoingStubbing<T> /*extends IOngoingStubbing*/ {
@@ -1212,6 +1212,13 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {
when(foo()).thenReturn(Optional.empty())
'''
+
+ if (!groovy.test.GroovyAssert.isAtLeastJdk('1.8')) return
+
+ assertScript '''
+ Map map() { [:] }
+ Optional.of(map()).orElse(Collections.emptyMap());
+ '''
}
@NotYetImplemented // GROOVY-8409, GROOVY-9902