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 c4b0f87fb0 GROOVY-11414: add test case c4b0f87fb0 is described below commit c4b0f87fb0ff602fb9b0ea71d1a51496d183c32a Author: Eric Milles <eric.mil...@thomsonreuters.com> AuthorDate: Tue Jun 25 13:05:42 2024 -0500 GROOVY-11414: add test case --- src/test/groovy/transform/stc/LambdaTest.groovy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/groovy/transform/stc/LambdaTest.groovy b/src/test/groovy/transform/stc/LambdaTest.groovy index 1fc2833b5e..3ef762194e 100644 --- a/src/test/groovy/transform/stc/LambdaTest.groovy +++ b/src/test/groovy/transform/stc/LambdaTest.groovy @@ -87,6 +87,16 @@ final class LambdaTest { ''' } + // GROOVY-11414 + @Test + void testFunction5() { + def err = shouldFail shell, ''' + def map = (Map<String, Long>) [:] + map.computeIfAbsent('key', (k) -> 1) + ''' + assert err =~ /Cannot return value of type int for lambda expecting java.lang.Long/ + } + @Test void testBinaryOperator() { assertScript shell, '''