Repository: groovy
Updated Branches:
  refs/heads/master 5c63ad68f -> 9ad1b2937


Fix the test groovy.bugs.Groovy5318Bug.testTypeArgumentsOnlyOnTheLastComponent


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/9ad1b293
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/9ad1b293
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/9ad1b293

Branch: refs/heads/master
Commit: 9ad1b2937f3e571fff2bfc85c71baa40218c3954
Parents: 5c63ad6
Author: sunlan <sun...@apache.org>
Authored: Sun Aug 6 01:20:36 2017 +0800
Committer: sunlan <sun...@apache.org>
Committed: Sun Aug 6 01:20:36 2017 +0800

----------------------------------------------------------------------
 src/test/groovy/bugs/Groovy5318Bug.groovy | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/9ad1b293/src/test/groovy/bugs/Groovy5318Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy5318Bug.groovy 
b/src/test/groovy/bugs/Groovy5318Bug.groovy
index 819dd58..d981ca2 100644
--- a/src/test/groovy/bugs/Groovy5318Bug.groovy
+++ b/src/test/groovy/bugs/Groovy5318Bug.groovy
@@ -19,12 +19,18 @@
 package groovy.bugs
 
 import gls.CompilableTestSupport
+import org.codehaus.groovy.control.CompilerConfiguration
 
 class Groovy5318Bug extends CompilableTestSupport {
     void testTypeArgumentsOnlyOnTheLastComponent() {
         def message = shouldNotCompile """
             def a = new java.util<Integer>.ArrayList<ArrayList<Integer>>()
         """
-        assert message.contains('Unexpected type arguments found prior to: 
ArrayList')
+
+        if (CompilerConfiguration.DEFAULT.antlr2Parser) {
+            assert message.contains('Unexpected type arguments found prior to: 
ArrayList')
+        } else {
+            assert message.contains('Unexpected input: \'new 
java.util<Integer>.\'')
+        }
     }
 }

Reply via email to