You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/04/12 17:09:07 UTC

[groovy] branch master updated: GROOVY-9008: Add one more test

This is an automated email from the ASF dual-hosted git repository.

sunlan 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 6e6e000  GROOVY-9008: Add one more test
6e6e000 is described below

commit 6e6e000826ef5d4fc774cbc6258eb179fd3fe515
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Apr 13 01:08:53 2019 +0800

    GROOVY-9008: Add one more test
---
 src/test/groovy/transform/stc/MethodReferenceTest.groovy | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/test/groovy/transform/stc/MethodReferenceTest.groovy b/src/test/groovy/transform/stc/MethodReferenceTest.groovy
index e144f29..ebdd450 100644
--- a/src/test/groovy/transform/stc/MethodReferenceTest.groovy
+++ b/src/test/groovy/transform/stc/MethodReferenceTest.groovy
@@ -360,4 +360,17 @@ class MethodReferenceTest extends GroovyTestCase {
             p()
         '''
     }
+
+    void testMethodNotFound() {
+        def errMsg = shouldFail '''
+            @groovy.transform.CompileStatic
+            void p() {
+                [1.0G, 2.0G, 3.0G].stream().reduce(0.0G, BigDecimal::addx)
+            }
+            
+            p()
+        '''
+
+        assert errMsg.contains('Failed to find the expected method[addx(java.math.BigDecimal,java.math.BigDecimal)] in the type[java.math.BigDecimal]')
+    }
 }