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 2023/11/25 18:21:50 UTC

(groovy) branch GROOVY-11229 updated: Fix failing test

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY-11229
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY-11229 by this push:
     new 88c8e15e9b Fix failing test
88c8e15e9b is described below

commit 88c8e15e9b6269f62ee7d451a13c3ec533953be8
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Nov 26 02:21:34 2023 +0800

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

diff --git a/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index 1a22cb3857..f871a99c44 100644
--- a/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -3069,7 +3069,7 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> {
           case INSTANCEOF:
               ctx.patternVariableDeclaration().putNodeMetaData(IS_INSIDE_INSTANCEOF_EXPR, Boolean.TRUE);
               PatternVariableExpression patternVariableExpression = this.visitPatternVariableDeclaration(ctx.patternVariableDeclaration());
-              ClassNode type = patternVariableExpression.getType();
+              ClassNode type = patternVariableExpression.getOriginType();
               ClassExpression classExpression = configureAST(new ClassExpression(type), type);
               classExpression.setPatternVariableExpression(patternVariableExpression);
               return configureAST(