Lines 31-37
Link Here
|
31 |
// All specified tests which does not belong to the class are skipped... |
31 |
// All specified tests which does not belong to the class are skipped... |
32 |
static { |
32 |
static { |
33 |
// TESTS_NAMES = new String[] { "test1245" }; |
33 |
// TESTS_NAMES = new String[] { "test1245" }; |
34 |
// TESTS_NUMBERS = new int[] { 1455 }; |
34 |
// TESTS_NUMBERS = new int[] { 1460 }; |
35 |
// TESTS_RANGE = new int[] { 1097, -1 }; |
35 |
// TESTS_RANGE = new int[] { 1097, -1 }; |
36 |
} |
36 |
} |
37 |
public static Test suite() { |
37 |
public static Test suite() { |
Lines 50153-50156
Link Here
|
50153 |
"Type safety: Unchecked invocation someMethod() of the generic method someMethod() of type Bug268798\n" + |
50153 |
"Type safety: Unchecked invocation someMethod() of the generic method someMethod() of type Bug268798\n" + |
50154 |
"----------\n"); |
50154 |
"----------\n"); |
50155 |
} |
50155 |
} |
|
|
50156 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=307885 |
50157 |
public void test1460() { |
50158 |
this.runNegativeTest( |
50159 |
new String[] { |
50160 |
"Test.java", |
50161 |
"class Test<A> {\n" + |
50162 |
" interface MyInt<K> {\n" + |
50163 |
" K getKey();\n" + |
50164 |
" }\n" + |
50165 |
" class MyEntry implements MyInt<A> {\n" + |
50166 |
" public A getKey() { return null; }\n" + |
50167 |
" @Override\n" + |
50168 |
" public boolean equals(Object o) {\n" + |
50169 |
" if(!(o instanceof MyEntry))\n" + |
50170 |
" return false;\n" + |
50171 |
" return true;\n" + |
50172 |
" }\n" + |
50173 |
" }\n" + |
50174 |
"}" |
50175 |
}, |
50176 |
"----------\n" + |
50177 |
"1. ERROR in Test.java (at line 9)\n" + |
50178 |
" if(!(o instanceof MyEntry))\n" + |
50179 |
" ^^^^^^^^^^^^^^^^^^^^^^\n" + |
50180 |
"Cannot perform instanceof check against parameterized type Test<A>.MyEntry. Use the form Test.MyEntry instead since further generic type information will be erased at runtime\n" + |
50181 |
"----------\n"); |
50182 |
} |
50156 |
} |
50183 |
} |