|
1 | 1 | /* |
2 | | - * Copyright 2012-2021 the original author or authors. |
| 2 | + * Copyright 2012-2022 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
37 | 37 | import org.codehaus.groovy.ast.stmt.ExpressionStatement; |
38 | 38 | import org.codehaus.groovy.control.SourceUnit; |
39 | 39 | import org.codehaus.groovy.control.io.ReaderSource; |
| 40 | +import org.codehaus.groovy.syntax.Token; |
| 41 | +import org.codehaus.groovy.syntax.Types; |
40 | 42 | import org.codehaus.groovy.transform.ASTTransformation; |
41 | 43 | import org.junit.jupiter.api.BeforeEach; |
42 | 44 | import org.junit.jupiter.api.Test; |
@@ -195,8 +197,8 @@ void transformationOfAnnotationOnLocalVariable() { |
195 | 197 | ClassNode classNode = new ClassNode("Test", 0, new ClassNode(Object.class)); |
196 | 198 | this.moduleNode.addClass(classNode); |
197 | 199 |
|
198 | | - DeclarationExpression declarationExpression = new DeclarationExpression(new VariableExpression("test"), null, |
199 | | - new ConstantExpression("test")); |
| 200 | + DeclarationExpression declarationExpression = new DeclarationExpression(new VariableExpression("test"), |
| 201 | + new Token(Types.ASSIGN, "=", 1, 1), new ConstantExpression("test")); |
200 | 202 | declarationExpression.addAnnotation(this.grabAnnotation); |
201 | 203 |
|
202 | 204 | BlockStatement code = new BlockStatement(Arrays.asList(new ExpressionStatement(declarationExpression)), |
|
0 commit comments