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 2017/01/20 01:52:22 UTC

[1/2] groovy git commit: Fix GROOVY-5311: Wrong line/col info for GStrings

Repository: groovy
Updated Branches:
  refs/heads/parrot 0e608ee53 -> ad1786eb2


Fix GROOVY-5311: Wrong line/col info for GStrings


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

Branch: refs/heads/parrot
Commit: e70f131cf2e16ecc01e96efcd2d8006217053a1d
Parents: 0e608ee
Author: sunlan <su...@apache.org>
Authored: Fri Jan 20 09:50:10 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Fri Jan 20 09:50:10 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/e70f131c/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index 84c5d77..c61a2c0 100644
--- a/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -2980,7 +2980,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
 
         if (asBoolean(ctx.LBRACE())) {
             if (asBoolean(ctx.statementExpression())) {
-                return this.configureAST(((ExpressionStatement) this.visit(ctx.statementExpression())).getExpression(), ctx);
+                return this.configureAST(((ExpressionStatement) this.visit(ctx.statementExpression())).getExpression(), ctx.statementExpression());
             } else { // e.g. "${}"
                 return this.configureAST(new ConstantExpression(null), ctx);
             }


[2/2] groovy git commit: Add test case for GROOVY-5652: Semicolon required after coercing to a parameterized (generic) type containing a parameterized (generic) type as its only or last type argument when there is no space between the ending ">>"

Posted by su...@apache.org.
Add test case for GROOVY-5652: Semicolon required after coercing to a parameterized (generic) type containing a parameterized (generic) type as its only or last type argument when there is no space between the ending ">>"


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

Branch: refs/heads/parrot
Commit: ad1786eb2721dc5e1e477cc46ece7ce548bd8b32
Parents: e70f131
Author: sunlan <su...@apache.org>
Authored: Fri Jan 20 09:52:08 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Fri Jan 20 09:52:08 2017 +0800

----------------------------------------------------------------------
 .../org/apache/groovy/parser/antlr4/GroovyParserTest.groovy    | 2 ++
 .../src/test/resources/bugs/BUG-GROOVY-5652.groovy             | 6 ++++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/ad1786eb/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy b/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
index e70cd90..d48e2e0 100644
--- a/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
+++ b/subprojects/groovy-parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/GroovyParserTest.groovy
@@ -329,6 +329,8 @@ class GroovyParserTest extends GroovyTestCase {
     void "test groovy core - BUG"() {
         doRunAndTest('bugs/BUG-GROOVY-4757.groovy');
         doRunAndTest('bugs/GROOVY-3898.groovy');
+        doRunAndTest('bugs/BUG-GROOVY-5652.groovy');
+
     }
 
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/ad1786eb/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-5652.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-5652.groovy b/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-5652.groovy
new file mode 100644
index 0000000..329a17a
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/bugs/BUG-GROOVY-5652.groovy
@@ -0,0 +1,6 @@
+package bugs
+
+def list = [[1,2],[3,4]] as List<List<Integer>>
+println list
+println 'bye'
+assert [[1,2],[3,4]] == list