Repository: incubator-groovy Updated Branches: refs/heads/master ced7989ad -> a38afed6f
GROOVY-7442 Spread-dot operator within assert isn't expected with @CompileStatic * Add unit test (issue fixed as side effect of changes for GROOVY-7656) Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/a38afed6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/a38afed6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/a38afed6 Branch: refs/heads/master Commit: a38afed6f9189e4b96cfd25876324de41b5dd559 Parents: ced7989 Author: Shil Sinha <sh...@apache.org> Authored: Mon Nov 16 23:55:56 2015 -0500 Committer: Shil Sinha <sh...@apache.org> Committed: Mon Nov 16 23:56:38 2015 -0500 ---------------------------------------------------------------------- .../asm/sc/ArraysAndCollectionsStaticCompileTest.groovy | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/a38afed6/src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy ---------------------------------------------------------------------- diff --git a/src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy b/src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy index 4a9fbc5..4d9cb64 100644 --- a/src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy +++ b/src/test/org/codehaus/groovy/classgen/asm/sc/ArraysAndCollectionsStaticCompileTest.groovy @@ -99,6 +99,17 @@ class ArraysAndCollectionsStaticCompileTest extends ArraysAndCollectionsSTCTest } } + //GROOVY-7442 + void testSpreadDotOperatorWithinAssert() { + assertScript ''' + def myMethod(String a, String b) { + assert [a, b]*.size() == [5, 5] + } + + myMethod('hello', 'world') + ''' + } + @Override void testForInLoop() { try {