Lines 13562-13565
Link Here
|
13562 |
}, |
13562 |
}, |
13563 |
""); |
13563 |
""); |
13564 |
} |
13564 |
} |
13565 |
} |
13565 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 |
|
|
13566 |
public void test501() { |
13567 |
this.runNegativeTest(new String[] { |
13568 |
"X.java", |
13569 |
"class X {" + |
13570 |
" public static void main(String[] args) {\n" + |
13571 |
" Foo<?> f1 = new Foo<Integer>();\n" + |
13572 |
" f1.bar = f1.bar;\n" + |
13573 |
" }\n" + |
13574 |
" }\n" + |
13575 |
"class Foo<T> {\n" + |
13576 |
" Bar<T> bar = new Bar<T>();\n" + |
13577 |
"}\n" + |
13578 |
"class Bar<T> {\n" + |
13579 |
" T t;\n" + |
13580 |
"}\n" |
13581 |
}, |
13582 |
"----------\n" + |
13583 |
"1. ERROR in X.java (at line 3)\n" + |
13584 |
"\tf1.bar = f1.bar;\n" + |
13585 |
"\t ^^^^^^\n" + |
13586 |
"Type mismatch: cannot convert from Bar<capture of ?> to Bar<capture of ?>\n" + |
13587 |
"----------\n"); |
13588 |
} |
13589 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 |
13590 |
public void test502() { |
13591 |
this.runConformTest( |
13592 |
new String[] { |
13593 |
"X.java", |
13594 |
"import java.util.List;\n" + |
13595 |
"class X {\n" + |
13596 |
" void foo(List<? extends I1> l1) {\n" + |
13597 |
" C1 c1 = (C1)l1.get(0);\n" + |
13598 |
" }\n" + |
13599 |
"}\n" + |
13600 |
"interface I1{}\n" + |
13601 |
"class C1{}\n" |
13602 |
}, |
13603 |
""); |
13604 |
} |
13605 |
} |