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 2018/02/17 20:00:17 UTC

groovy git commit: Fix the failing build

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 15669d76c -> 47753b958


Fix the failing build


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 47753b9585ae3a55fafc1996f065aaf3c6c5f983
Parents: 15669d7
Author: danielsun1106 <re...@hotmail.com>
Authored: Sun Feb 18 04:00:09 2018 +0800
Committer: danielsun1106 <re...@hotmail.com>
Committed: Sun Feb 18 04:00:09 2018 +0800

----------------------------------------------------------------------
 .../java/org/apache/groovy/parser/antlr4/AstBuilder.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/47753b95/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index c52e7e0..464c1ea 100644
--- a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -2366,7 +2366,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
                 return configureAST(methodCallExpression, ctx);
             }
 
-            if (baseExpr instanceof ClassExpression) { // void and primitive type AST node must be an instance of ClassExpression
+            if (baseExpr instanceof VariableExpression) { // void and primitive type AST node must be an instance of VariableExpression
                 String baseExprText = baseExpr.getText();
                 if (VOID_STR.equals(baseExprText)) { // e.g. void()
                     return configureAST(this.createCallMethodCallExpression(this.createConstantExpression(baseExpr), argumentsExpr), ctx);
@@ -3151,7 +3151,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
     }
 
     @Override
-    public ClassExpression visitBuiltInTypePrmrAlt(BuiltInTypePrmrAltContext ctx) {
+    public VariableExpression visitBuiltInTypePrmrAlt(BuiltInTypePrmrAltContext ctx) {
         return configureAST(this.visitBuiltInType(ctx.builtInType()), ctx);
     }
 
@@ -3406,7 +3406,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
     */
 
     @Override
-    public ClassExpression visitBuiltInType(BuiltInTypeContext ctx) {
+    public VariableExpression visitBuiltInType(BuiltInTypeContext ctx) {
         String text;
         if (asBoolean(ctx.VOID())) {
             text = ctx.VOID().getText();
@@ -3416,7 +3416,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
             throw createParsingFailedException("Unsupported built-in type: " + ctx, ctx);
         }
 
-        return configureAST(new ClassExpression(ClassHelper.make(text)), ctx);
+        return configureAST(new VariableExpression(text), ctx);
     }