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/xform/TypeCheckedTests.java
+40-8
Original file line number
Diff line number
Diff line change
@@ -277,7 +277,13 @@ public void testTypeChecked12() {
277
277
};
278
278
//@formatter:on
279
279
280
-
runNegativeTest(sources, "");
280
+
runNegativeTest(sources,
281
+
"----------\n" +
282
+
"1. ERROR in Main.groovy (at line 4)\n" +
283
+
"\tSet<String> keys = args.keySet()\n" +
284
+
"\t ^^^^^^^^^^^^^\n" +
285
+
"Groovy:[Static type checking] - Incompatible generic argument types. Cannot assign java.util.Set<java.lang.Object> to: java.util.Set<java.lang.String>\n" +
286
+
"----------\n");
281
287
}
282
288
283
289
@Test
@@ -3280,6 +3286,38 @@ public void testTypeChecked10053() {
3280
3286
runConformTest(sources, "[42]");
3281
3287
}
3282
3288
3289
+
@Test
3290
+
publicvoidtestTypeChecked10055() {
3291
+
//@formatter:off
3292
+
String[] sources = {
3293
+
"Main.groovy",
3294
+
"@groovy.transform.TypeChecked\n" +
3295
+
"void test() {\n" +
3296
+
" new C<>().foo('x').bar('y').baz('z')\n" +
3297
+
"}\n",
3298
+
3299
+
"Types.groovy",
3300
+
"abstract class A<Self extends A<Self>> {\n" +
3301
+
" Self foo(inputs) {\n" +
3302
+
" this\n" +
3303
+
" }\n" +
3304
+
"}\n" +
3305
+
"abstract class B<Self extends B<Self>> extends A<Self> {\n" +
0 commit comments