|
Lines 42124-42127
Link Here
|
| 42124 |
}, |
42124 |
}, |
| 42125 |
""); |
42125 |
""); |
| 42126 |
} |
42126 |
} |
|
|
42127 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 |
| 42128 |
public void test1269() { |
| 42129 |
this.runConformTest( |
| 42130 |
new String[] { |
| 42131 |
"X.java", |
| 42132 |
"public class X {\n" + |
| 42133 |
" // some functor and functor instances definitions\n" + |
| 42134 |
" static interface OO<T, E> { \n" + |
| 42135 |
" public T eval(E x);\n" + |
| 42136 |
" }\n" + |
| 42137 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42138 |
" public String eval(T x);\n" + |
| 42139 |
" }\n" + |
| 42140 |
" static interface TT extends TO<String> {\n" + |
| 42141 |
" public String eval(String x);\n" + |
| 42142 |
" }\n" + |
| 42143 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42144 |
" static final TT FUNC2 = null;\n" + |
| 42145 |
"\n" + |
| 42146 |
" // some functor combinators\n" + |
| 42147 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42148 |
" System.out.println(\"#1#\");\n" + |
| 42149 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42150 |
" }\n" + |
| 42151 |
" // body of the test\n" + |
| 42152 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42153 |
" }\n" + |
| 42154 |
" public static void main(String[] args) {\n" + |
| 42155 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42156 |
" }\n" + |
| 42157 |
"}\n", // ================= |
| 42158 |
}, |
| 42159 |
"#1#"); |
| 42160 |
} |
| 42161 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42162 |
public void test1270() { |
| 42163 |
this.runConformTest( |
| 42164 |
new String[] { |
| 42165 |
"X.java", |
| 42166 |
"public class X {\n" + |
| 42167 |
" // some functor and functor instances definitions\n" + |
| 42168 |
" static interface OO<T, E> { \n" + |
| 42169 |
" public T eval(E x);\n" + |
| 42170 |
" }\n" + |
| 42171 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42172 |
" public String eval(T x);\n" + |
| 42173 |
" }\n" + |
| 42174 |
" static interface TT extends TO<String> {\n" + |
| 42175 |
" public String eval(String x);\n" + |
| 42176 |
" }\n" + |
| 42177 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42178 |
" static final TT FUNC2 = null;\n" + |
| 42179 |
"\n" + |
| 42180 |
" // some functor combinators\n" + |
| 42181 |
" static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2\n" + |
| 42182 |
" System.out.println(\"#2#\");\n" + |
| 42183 |
" return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; \n" + |
| 42184 |
" }\n" + |
| 42185 |
" // body of the test\n" + |
| 42186 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42187 |
" }\n" + |
| 42188 |
" public static void main(String[] args) {\n" + |
| 42189 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42190 |
" }\n" + |
| 42191 |
"}\n", // ================= |
| 42192 |
}, |
| 42193 |
"#2#"); |
| 42194 |
} |
| 42195 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42196 |
public void test1271() { |
| 42197 |
this.runNegativeTest( |
| 42198 |
new String[] { |
| 42199 |
"X.java", |
| 42200 |
"public class X {\n" + |
| 42201 |
" // some functor and functor instances definitions\n" + |
| 42202 |
" static interface OO<T, E> { \n" + |
| 42203 |
" public T eval(E x);\n" + |
| 42204 |
" }\n" + |
| 42205 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42206 |
" public String eval(T x);\n" + |
| 42207 |
" }\n" + |
| 42208 |
" static interface TT extends TO<String> {\n" + |
| 42209 |
" public String eval(String x);\n" + |
| 42210 |
" }\n" + |
| 42211 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42212 |
" static final TT FUNC2 = null;\n" + |
| 42213 |
"\n" + |
| 42214 |
" // some functor combinators\n" + |
| 42215 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42216 |
" System.out.println(\"#3#\");\n" + |
| 42217 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42218 |
" }\n" + |
| 42219 |
" // body of the test\n" + |
| 42220 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42221 |
" }\n" + |
| 42222 |
" public static void main(String[] args) {\n" + |
| 42223 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42224 |
" }\n" + |
| 42225 |
"}\n", // ================= |
| 42226 |
}, |
| 42227 |
"----------\n" + |
| 42228 |
"1. ERROR in X.java (at line 24)\n" + |
| 42229 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42230 |
" ^^^\n" + |
| 42231 |
"The method put(Class<E>, X.TO<? super E>) in the type X is not applicable for the arguments (Class<Integer>, X.OO<String,Object>)\n" + |
| 42232 |
"----------\n"); |
| 42233 |
} |
| 42234 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42235 |
public void test1272() { |
| 42236 |
this.runConformTest( |
| 42237 |
new String[] { |
| 42238 |
"X.java", |
| 42239 |
"public class X {\n" + |
| 42240 |
" // some functor and functor instances definitions\n" + |
| 42241 |
" static interface OO<T, E> { \n" + |
| 42242 |
" public T eval(E x);\n" + |
| 42243 |
" }\n" + |
| 42244 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42245 |
" public String eval(T x);\n" + |
| 42246 |
" }\n" + |
| 42247 |
" static interface TT extends TO<String> {\n" + |
| 42248 |
" public String eval(String x);\n" + |
| 42249 |
" }\n" + |
| 42250 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42251 |
" static final TT FUNC2 = null;\n" + |
| 42252 |
"\n" + |
| 42253 |
" // some functor combinators\n" + |
| 42254 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42255 |
" System.out.print(\"#3#\");\n" + |
| 42256 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42257 |
" }\n" + |
| 42258 |
" // body of the test\n" + |
| 42259 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42260 |
" }\n" + |
| 42261 |
" public static void main(String[] args) {\n" + |
| 42262 |
" try {\n" + |
| 42263 |
" put(Integer.class, (TO<Object>)combine(FUNC2, FUNC1));\n" + |
| 42264 |
" } catch(ClassCastException e) {\n" + |
| 42265 |
" System.out.println(\"#CLASSCAST#\");\n" + |
| 42266 |
" }\n" + |
| 42267 |
" }\n" + |
| 42268 |
"}\n", // ================= |
| 42269 |
}, |
| 42270 |
"#3##CLASSCAST#"); |
| 42271 |
} |
| 42272 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42273 |
public void test1273() { |
| 42274 |
this.runConformTest( |
| 42275 |
new String[] { |
| 42276 |
"X.java", |
| 42277 |
"public class X {\n" + |
| 42278 |
" // some functor and functor instances definitions\n" + |
| 42279 |
" static interface OO<T, E> { \n" + |
| 42280 |
" public T eval(E x);\n" + |
| 42281 |
" }\n" + |
| 42282 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42283 |
" public String eval(T x);\n" + |
| 42284 |
" }\n" + |
| 42285 |
" static interface TT extends TO<String> {\n" + |
| 42286 |
" public String eval(String x);\n" + |
| 42287 |
" }\n" + |
| 42288 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42289 |
" static final TT FUNC2 = null;\n" + |
| 42290 |
"\n" + |
| 42291 |
" // some functor combinators\n" + |
| 42292 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42293 |
" System.out.println(\"#1#\");\n" + |
| 42294 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42295 |
" }\n" + |
| 42296 |
" static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2\n" + |
| 42297 |
" System.out.println(\"#2#\");\n" + |
| 42298 |
" return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; \n" + |
| 42299 |
" }\n" + |
| 42300 |
" // body of the test\n" + |
| 42301 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42302 |
" }\n" + |
| 42303 |
" public static void main(String[] args) {\n" + |
| 42304 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42305 |
" }\n" + |
| 42306 |
"}\n", // ================= |
| 42307 |
}, |
| 42308 |
"#1#"); |
| 42309 |
} |
| 42310 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42311 |
public void test1274() { |
| 42312 |
this.runConformTest( |
| 42313 |
new String[] { |
| 42314 |
"X.java", |
| 42315 |
"public class X {\n" + |
| 42316 |
" // some functor and functor instances definitions\n" + |
| 42317 |
" static interface OO<T, E> { \n" + |
| 42318 |
" public T eval(E x);\n" + |
| 42319 |
" }\n" + |
| 42320 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42321 |
" public String eval(T x);\n" + |
| 42322 |
" }\n" + |
| 42323 |
" static interface TT extends TO<String> {\n" + |
| 42324 |
" public String eval(String x);\n" + |
| 42325 |
" }\n" + |
| 42326 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42327 |
" static final TT FUNC2 = null;\n" + |
| 42328 |
"\n" + |
| 42329 |
" // some functor combinators\n" + |
| 42330 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42331 |
" System.out.println(\"#1#\");\n" + |
| 42332 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42333 |
" }\n" + |
| 42334 |
" static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2\n" + |
| 42335 |
" System.out.println(\"#2#\");\n" + |
| 42336 |
" return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; \n" + |
| 42337 |
" }\n" + |
| 42338 |
" // body of the test\n" + |
| 42339 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42340 |
" }\n" + |
| 42341 |
" public static void main(String[] args) {\n" + |
| 42342 |
" put(Integer.class, X.<Object>combine(FUNC2, FUNC1));\n" + |
| 42343 |
" }\n" + |
| 42344 |
"}\n", // ================= |
| 42345 |
}, |
| 42346 |
"#1#"); |
| 42347 |
} |
| 42348 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42349 |
public void test1275() { |
| 42350 |
this.runConformTest( |
| 42351 |
new String[] { |
| 42352 |
"X.java", |
| 42353 |
"public class X {\n" + |
| 42354 |
" // some functor and functor instances definitions\n" + |
| 42355 |
" static interface OO<T, E> { \n" + |
| 42356 |
" public T eval(E x);\n" + |
| 42357 |
" }\n" + |
| 42358 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42359 |
" public String eval(T x);\n" + |
| 42360 |
" }\n" + |
| 42361 |
" static interface TT extends TO<String> {\n" + |
| 42362 |
" public String eval(String x);\n" + |
| 42363 |
" }\n" + |
| 42364 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42365 |
" static final TT FUNC2 = null;\n" + |
| 42366 |
"\n" + |
| 42367 |
" // some functor combinators\n" + |
| 42368 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42369 |
" System.out.println(\"#1#\");\n" + |
| 42370 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42371 |
" }\n" + |
| 42372 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42373 |
" System.out.println(\"#3#\");\n" + |
| 42374 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42375 |
" }\n" + |
| 42376 |
" // body of the test\n" + |
| 42377 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42378 |
" }\n" + |
| 42379 |
" public static void main(String[] args) {\n" + |
| 42380 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42381 |
" }\n" + |
| 42382 |
"}\n", // ================= |
| 42383 |
}, |
| 42384 |
"#1#"); |
| 42385 |
} |
| 42386 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42387 |
public void test1276() { |
| 42388 |
this.runConformTest( |
| 42389 |
new String[] { |
| 42390 |
"X.java", |
| 42391 |
"public class X {\n" + |
| 42392 |
" // some functor and functor instances definitions\n" + |
| 42393 |
" static interface OO<T, E> { \n" + |
| 42394 |
" public T eval(E x);\n" + |
| 42395 |
" }\n" + |
| 42396 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42397 |
" public String eval(T x);\n" + |
| 42398 |
" }\n" + |
| 42399 |
" static interface TT extends TO<String> {\n" + |
| 42400 |
" public String eval(String x);\n" + |
| 42401 |
" }\n" + |
| 42402 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42403 |
" static final TT FUNC2 = null;\n" + |
| 42404 |
"\n" + |
| 42405 |
" // some functor combinators\n" + |
| 42406 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42407 |
" System.out.println(\"#1#\");\n" + |
| 42408 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42409 |
" }\n" + |
| 42410 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42411 |
" System.out.println(\"#3#\");\n" + |
| 42412 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42413 |
" }\n" + |
| 42414 |
" // body of the test\n" + |
| 42415 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42416 |
" }\n" + |
| 42417 |
" public static void main(String[] args) {\n" + |
| 42418 |
" put(Integer.class, X.<Object>combine(FUNC2, FUNC1));\n" + |
| 42419 |
" }\n" + |
| 42420 |
"}\n", // ================= |
| 42421 |
}, |
| 42422 |
"#1#"); |
| 42423 |
} |
| 42424 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42425 |
public void test1277() { |
| 42426 |
this.runConformTest( |
| 42427 |
new String[] { |
| 42428 |
"X.java", |
| 42429 |
"public class X {\n" + |
| 42430 |
" // some functor and functor instances definitions\n" + |
| 42431 |
" static interface OO<T, E> { \n" + |
| 42432 |
" public T eval(E x);\n" + |
| 42433 |
" }\n" + |
| 42434 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42435 |
" public String eval(T x);\n" + |
| 42436 |
" }\n" + |
| 42437 |
" static interface TT extends TO<String> {\n" + |
| 42438 |
" public String eval(String x);\n" + |
| 42439 |
" }\n" + |
| 42440 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42441 |
" static final TT FUNC2 = null;\n" + |
| 42442 |
"\n" + |
| 42443 |
" // some functor combinators\n" + |
| 42444 |
" static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2\n" + |
| 42445 |
" System.out.println(\"#2#\");\n" + |
| 42446 |
" return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; \n" + |
| 42447 |
" }\n" + |
| 42448 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42449 |
" System.out.println(\"#3#\");\n" + |
| 42450 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42451 |
" }\n" + |
| 42452 |
" // body of the test\n" + |
| 42453 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42454 |
" }\n" + |
| 42455 |
" public static void main(String[] args) {\n" + |
| 42456 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42457 |
" }\n" + |
| 42458 |
"}\n", // ================= |
| 42459 |
}, |
| 42460 |
"#2#"); |
| 42461 |
} |
| 42462 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42463 |
public void test1278() { |
| 42464 |
this.runConformTest( |
| 42465 |
new String[] { |
| 42466 |
"X.java", |
| 42467 |
"public class X {\n" + |
| 42468 |
" // some functor and functor instances definitions\n" + |
| 42469 |
" static interface OO<T, E> { \n" + |
| 42470 |
" public T eval(E x);\n" + |
| 42471 |
" }\n" + |
| 42472 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42473 |
" public String eval(T x);\n" + |
| 42474 |
" }\n" + |
| 42475 |
" static interface TT extends TO<String> {\n" + |
| 42476 |
" public String eval(String x);\n" + |
| 42477 |
" }\n" + |
| 42478 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42479 |
" static final TT FUNC2 = null;\n" + |
| 42480 |
"\n" + |
| 42481 |
" // some functor combinators\n" + |
| 42482 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42483 |
" System.out.println(\"#1#\");\n" + |
| 42484 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42485 |
" }\n" + |
| 42486 |
" static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2\n" + |
| 42487 |
" System.out.println(\"#2#\");\n" + |
| 42488 |
" return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; \n" + |
| 42489 |
" }\n" + |
| 42490 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42491 |
" System.out.println(\"#3#\");\n" + |
| 42492 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42493 |
" }\n" + |
| 42494 |
" // body of the test\n" + |
| 42495 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42496 |
" }\n" + |
| 42497 |
" public static void main(String[] args) {\n" + |
| 42498 |
" put(Integer.class, combine(FUNC2, FUNC1));\n" + |
| 42499 |
" }\n" + |
| 42500 |
"}\n", // ================= |
| 42501 |
}, |
| 42502 |
"#1#"); |
| 42503 |
} |
| 42504 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42505 |
public void test1279() { |
| 42506 |
this.runConformTest( |
| 42507 |
new String[] { |
| 42508 |
"X.java", |
| 42509 |
"public class X {\n" + |
| 42510 |
" // some functor and functor instances definitions\n" + |
| 42511 |
" static interface OO<T, E> { \n" + |
| 42512 |
" public T eval(E x);\n" + |
| 42513 |
" }\n" + |
| 42514 |
" static interface TO<T> extends OO<String, T> {\n" + |
| 42515 |
" public String eval(T x);\n" + |
| 42516 |
" }\n" + |
| 42517 |
" static interface TT extends TO<String> {\n" + |
| 42518 |
" public String eval(String x);\n" + |
| 42519 |
" }\n" + |
| 42520 |
" static final TO<Object> FUNC1 = null;\n" + |
| 42521 |
" static final TT FUNC2 = null;\n" + |
| 42522 |
"\n" + |
| 42523 |
" // some functor combinators\n" + |
| 42524 |
" static <E> TO<E> combine(final TT x, final TO<? super E> y) { // # 1\n" + |
| 42525 |
" System.out.println(\"#1#\");\n" + |
| 42526 |
" return new TO<E>() { public String eval(E o) { return x.eval(y.eval(o)); } }; \n" + |
| 42527 |
" }\n" + |
| 42528 |
" static <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { // # 2\n" + |
| 42529 |
" System.out.println(\"#2#\");\n" + |
| 42530 |
" return new TO<T>() { public String eval(T o) { return x.eval(y.eval(o)); } }; \n" + |
| 42531 |
" }\n" + |
| 42532 |
" static <E, T, V> OO<E, V> combine(final OO<E, ? super T> x, final OO<T, V> y) { // # 3\n" + |
| 42533 |
" System.out.println(\"#3#\");\n" + |
| 42534 |
" return new OO<E, V>() { public E eval(V o) { return x.eval(y.eval(o)); } };\n" + |
| 42535 |
" }\n" + |
| 42536 |
" // body of the test\n" + |
| 42537 |
" static <E> void put(Class<E> type, TO<? super E> func) {\n" + |
| 42538 |
" }\n" + |
| 42539 |
" public static void main(String[] args) {\n" + |
| 42540 |
" put(Integer.class, X.<Object>combine(FUNC2, FUNC1));\n" + |
| 42541 |
" }\n" + |
| 42542 |
"}\n", // ================= |
| 42543 |
}, |
| 42544 |
"#1#"); |
| 42545 |
} |
| 42546 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42547 |
public void test1280() { |
| 42548 |
this.runConformTest( |
| 42549 |
new String[] { |
| 42550 |
"X.java", |
| 42551 |
"interface OO<T,E> {}\n" + |
| 42552 |
"interface TO<T> extends OO<String,T> {}\n" + |
| 42553 |
"interface TT extends TO<String> {}\n" + |
| 42554 |
"\n" + |
| 42555 |
"public class X {\n" + |
| 42556 |
" <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T> y) { return null; }\n" + |
| 42557 |
" void foo(TT tt, TO<? super Object> too) {\n" + |
| 42558 |
" combine(tt, too);\n" + |
| 42559 |
" }\n" + |
| 42560 |
"}", // ================= |
| 42561 |
}, |
| 42562 |
""); |
| 42563 |
} |
| 42564 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42565 |
public void test1281() { |
| 42566 |
this.runConformTest( |
| 42567 |
new String[] { |
| 42568 |
"X.java", |
| 42569 |
"interface OO<T,E> {}\n" + |
| 42570 |
"interface TO<T> extends OO<String,T> {}\n" + |
| 42571 |
"interface TT extends TO<String> {}\n" + |
| 42572 |
"\n" + |
| 42573 |
"public class X {\n" + |
| 42574 |
" <E, T> TO<T> combine(final TO<? super E> x, final OO<E, T>[] y) { return null; }\n" + |
| 42575 |
" void foo(TT tt, TO<? super Object>[] too) {\n" + |
| 42576 |
" combine(tt, too);\n" + |
| 42577 |
" }\n" + |
| 42578 |
"}", // ================= |
| 42579 |
}, |
| 42580 |
""); |
| 42581 |
} |
| 42582 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42583 |
public void test1282() { |
| 42584 |
this.runNegativeTest( |
| 42585 |
new String[] { |
| 42586 |
"X.java", |
| 42587 |
"public class X {\n" + |
| 42588 |
" static interface OO<T,E> {}\n" + |
| 42589 |
" static interface TO<T> extends OO<String,T> {}\n" + |
| 42590 |
" static interface TT extends TO<String> {}\n" + |
| 42591 |
" \n" + |
| 42592 |
" <E, T> TO<T> combine(TT x, TO<? super E> y) { return null; }\n" + |
| 42593 |
" void foo(TO<? super String> too, OO<String,Object> oo) {\n" + |
| 42594 |
" combine(too, oo);\n" + |
| 42595 |
" }\n" + |
| 42596 |
"}", // ================= |
| 42597 |
}, |
| 42598 |
"----------\n" + |
| 42599 |
"1. ERROR in X.java (at line 8)\r\n" + |
| 42600 |
" combine(too, oo);\r\n" + |
| 42601 |
" ^^^^^^^\n" + |
| 42602 |
"The method combine(X.TT, X.TO<? super E>) in the type X is not applicable for the arguments (X.TO<capture#1-of ? super String>, X.OO<String,Object>)\n" + |
| 42603 |
"----------\n"); |
| 42604 |
} |
| 42605 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=216686 - variation |
| 42606 |
public void test1283() { |
| 42607 |
this.runNegativeTest( |
| 42608 |
new String[] { |
| 42609 |
"X.java", |
| 42610 |
"public class X {\n" + |
| 42611 |
" static interface OO<T,E> {}\n" + |
| 42612 |
" static interface TO<T> extends OO<String,T> {}\n" + |
| 42613 |
" static interface TT extends TO<String> {}\n" + |
| 42614 |
" \n" + |
| 42615 |
" <E, T> TO<T> combine(TT[] x, TO<? super E>[] y) { return null; }\n" + |
| 42616 |
" void foo(TO<? super String>[] too, OO<String,Object>[] oo) {\n" + |
| 42617 |
" combine(too, oo);\n" + |
| 42618 |
" }\n" + |
| 42619 |
"}", // ================= |
| 42620 |
}, |
| 42621 |
"----------\n" + |
| 42622 |
"1. ERROR in X.java (at line 8)\r\n" + |
| 42623 |
" combine(too, oo);\r\n" + |
| 42624 |
" ^^^^^^^\n" + |
| 42625 |
"The method combine(X.TT[], X.TO<? super E>[]) in the type X is not applicable for the arguments (X.TO<? super String>[], X.OO<String,Object>[])\n" + |
| 42626 |
"----------\n"); |
| 42627 |
} |
| 42127 |
} |
42628 |
} |