Repository: groovy Updated Branches: refs/heads/GROOVY_2_6_X 020e14b40 -> 670004094
Fix the test groovy.bugs.Groovy5318Bug.testTypeArgumentsOnlyOnTheLastComponent (cherry picked from commit 9ad1b29) Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/67000409 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/67000409 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/67000409 Branch: refs/heads/GROOVY_2_6_X Commit: 670004094e32952cdf9622a22b43aec166ed037f Parents: 020e14b Author: sunlan <[email protected]> Authored: Sun Aug 6 01:20:36 2017 +0800 Committer: sunlan <[email protected]> Committed: Sun Aug 6 01:21:34 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/67000409/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>.\'') + } } }
