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/GroovySimpleTests.java
+36
Original file line number
Diff line number
Diff line change
@@ -4297,6 +4297,42 @@ public void testImplementingInterface9() {
4297
4297
runConformTest(sources, "8:30pm");
4298
4298
}
4299
4299
4300
+
@Test// GROOVY-9259
4301
+
publicvoidtestImplementingInterface10() {
4302
+
assumeTrue(isParrotParser()); // TODO: support default in antlr2 parser?
4303
+
4304
+
//@formatter:off
4305
+
String[] sources = {
4306
+
"Script.groovy",
4307
+
"print new C().m()\n",
4308
+
4309
+
"A.java",
4310
+
"public interface A {\n" +
4311
+
" String m();\n" +
4312
+
"}\n",
4313
+
4314
+
"B.groovy",
4315
+
"interface B extends A {\n" +
4316
+
" default String m() {\n" +
4317
+
" 'G'\n" +
4318
+
" }\n" +
4319
+
" static String sm() {\n" +
4320
+
" 'S'\n" +
4321
+
" }\n" +
4322
+
"}\n",
4323
+
4324
+
"C.groovy",
4325
+
"class C implements B {\n" +
4326
+
" @Override String m() {\n" +
4327
+
" 'C' + B.super.m() + sm()\n" +
4328
+
" }\n" +
4329
+
"}\n",
4330
+
};
4331
+
//@formatter:on
4332
+
4333
+
runConformTest(sources, "CGS");
4334
+
}
4335
+
4300
4336
// WMTW: Groovy compilation unit scope adds the extra default import for java.util so List can be seen
0 commit comments