Skip to content

Commit 62fedca

Browse files
committed
GROOVY-10457
1 parent 5bd1319 commit 62fedca

File tree

5 files changed

+1200
-0
lines changed

5 files changed

+1200
-0
lines changed

base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/xform/StaticCompilationTests.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7214,4 +7214,23 @@ public void testCompileStatic10424() {
72147214

72157215
runConformTest(sources, "works");
72167216
}
7217+
7218+
@Test
7219+
public void testCompileStatic10457() {
7220+
//@formatter:off
7221+
String[] sources = {
7222+
"Main.groovy",
7223+
"@groovy.transform.CompileStatic\n" +
7224+
"class C {\n" +
7225+
" @groovy.transform.CompileDynamic\n" +
7226+
" C() {\n" +
7227+
" print(new StringReader('works').text)\n" +
7228+
" }\n" +
7229+
"}\n" +
7230+
"new C()\n",
7231+
};
7232+
//@formatter:on
7233+
7234+
runConformTest(sources, "works");
7235+
}
72177236
}

base/org.codehaus.groovy30/.checkstyle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<file-match-pattern match-pattern="groovy/transform/NamedVariantASTTransformation.java" include-pattern="false" />
6969
<file-match-pattern match-pattern="groovy/transform/NullCheckASTTransformation.java" include-pattern="false" />
7070
<file-match-pattern match-pattern="groovy/transform/TupleConstructorASTTransformation.java" include-pattern="false" />
71+
<file-match-pattern match-pattern="groovy/transform/sc/StaticCompilationVisitor.java" include-pattern="false" />
7172
<file-match-pattern match-pattern="groovy/transform/sc/TemporaryVariableExpression.java" include-pattern="false" />
7273
<file-match-pattern match-pattern="groovy/transform/sc/transformers/(Binary|Boolean|MethodCall)ExpressionTransformer.java" include-pattern="false" />
7374
<file-match-pattern match-pattern="groovy/transform/sc/transformers/CompareIdentityExpression.java" include-pattern="false" />

0 commit comments

Comments
 (0)