You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/GroovyCompilerTestSuite.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2009-2025 the original author or authors.
2
+
* Copyright 2009-2026 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.
Copy file name to clipboardExpand all lines: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/InnerClassTests.java
+35-3Lines changed: 35 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2009-2024 the original author or authors.
2
+
* Copyright 2009-2026 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.
@@ -526,7 +526,7 @@ public void testAnonymousInnerClass2() {
526
526
//@formatter:off
527
527
String[] sources = {
528
528
"A.groovy",
529
-
"class A {" +
529
+
"class A {\n" +
530
530
" def foo = new Runnable() {\n" +
531
531
" void run() {\n" +
532
532
" println 'hi!'\n" +
@@ -562,7 +562,7 @@ public void testAnonymousInnerClass2a() {
562
562
//@formatter:off
563
563
String[] sources = {
564
564
"A.groovy",
565
-
"class A {" +
565
+
"class A {\n" +
566
566
" @Lazy def foo = new Runnable() {\n" +
567
567
" void run() {\n" +
568
568
" println 'hi!'\n" +
@@ -593,6 +593,38 @@ public void testAnonymousInnerClass2a() {
593
593
"}");
594
594
}
595
595
596
+
@Test
597
+
publicvoidtestAnonymousInnerClass2b() {
598
+
//@formatter:off
599
+
String[] sources = {
600
+
"Main.groovy",
601
+
"A.foo.run()\n",
602
+
603
+
"A.groovy",
604
+
"interface A {\n" +
605
+
" def foo = new Runnable() {\n" +
606
+
" void run() {\n" +
607
+
" println 'hi!'\n" +
608
+
" }\n" +
609
+
" }\n" +
610
+
"}\n",
611
+
};
612
+
//@formatter:on
613
+
614
+
runConformTest(sources, "hi!");
615
+
616
+
checkGCUDeclaration("A.groovy",
617
+
"public interface A {\n" +
618
+
" public static final java.lang.Object foo = new Runnable() {\n" +
<li>Sources available at: <ahref="https://dist.apache.org/repos/dist/release/groovy/5.0.4/sources/apache-groovy-src-5.0.4.zip">https://dist.apache.org/repos/dist/release/groovy/5.0.4/sources/apache-groovy-src-5.0.4.zip</a></li>
<li>Sources available at: <ahref="https://dist.apache.org/repos/dist/release/groovy/5.0.5/sources/apache-groovy-src-5.0.5.zip">https://dist.apache.org/repos/dist/release/groovy/5.0.5/sources/apache-groovy-src-5.0.5.zip</a></li>
0 commit comments