Index: GenericTypeTest.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.196 diff -u -r1.196 GenericTypeTest.java --- GenericTypeTest.java 15 Feb 2005 10:27:21 -0000 1.196 +++ GenericTypeTest.java 18 Feb 2005 18:59:43 -0000 @@ -13562,4 +13562,44 @@ }, ""); } -} \ No newline at end of file +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 +public void test501() { + this.runNegativeTest(new String[] { + "X.java", + "class X {" + + " public static void main(String[] args) {\n" + + " Foo f1 = new Foo();\n" + + " f1.bar = f1.bar;\n" + + " }\n" + + " }\n" + + "class Foo {\n" + + " Bar bar = new Bar();\n" + + "}\n" + + "class Bar {\n" + + " T t;\n" + + "}\n" + }, + "----------\n" + + "1. ERROR in X.java (at line 3)\n" + + "\tf1.bar = f1.bar;\n" + + "\t ^^^^^^\n" + + "Type mismatch: cannot convert from Bar to Bar\n" + + "----------\n"); +} +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 +public void test502() { + this.runConformTest( + new String[] { + "X.java", + "import java.util.List;\n" + + "class X {\n" + + " void foo(List l1) {\n" + + " C1 c1 = (C1)l1.get(0);\n" + + " }\n" + + "}\n" + + "interface I1{}\n" + + "class C1{}\n" + }, + ""); +} +}