Lines 16-21
Link Here
|
16 |
import junit.framework.Test; |
16 |
import junit.framework.Test; |
17 |
|
17 |
|
18 |
import org.eclipse.jdt.core.Flags; |
18 |
import org.eclipse.jdt.core.Flags; |
|
|
19 |
import org.eclipse.jdt.core.JavaCore; |
19 |
import org.eclipse.jdt.core.ToolFactory; |
20 |
import org.eclipse.jdt.core.ToolFactory; |
20 |
import org.eclipse.jdt.core.tests.util.Util; |
21 |
import org.eclipse.jdt.core.tests.util.Util; |
21 |
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler; |
22 |
import org.eclipse.jdt.core.util.ClassFileBytesDisassembler; |
Lines 27-33
Link Here
|
27 |
public class MethodVerifyTest extends AbstractComparableTest { |
28 |
public class MethodVerifyTest extends AbstractComparableTest { |
28 |
static { |
29 |
static { |
29 |
// TESTS_NAMES = new String[] { "test211" }; |
30 |
// TESTS_NAMES = new String[] { "test211" }; |
30 |
// TESTS_NUMBERS = new int[] { 184 }; |
31 |
// TESTS_NUMBERS = new int[] { 213 }; |
31 |
// TESTS_RANGE = new int[] { 190, -1}; |
32 |
// TESTS_RANGE = new int[] { 190, -1}; |
32 |
} |
33 |
} |
33 |
|
34 |
|
Lines 11009-11012
Link Here
|
11009 |
"Name clash: The method foo(T) of type Interface<T> has the same erasure as foo(T) of type Base<T> but does not override it\n" + |
11010 |
"Name clash: The method foo(T) of type Interface<T> has the same erasure as foo(T) of type Base<T> but does not override it\n" + |
11010 |
"----------\n"); |
11011 |
"----------\n"); |
11011 |
} |
11012 |
} |
|
|
11013 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 |
11014 |
public void _test213() { |
11015 |
Map compilerOptions15 = getCompilerOptions(); |
11016 |
compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); |
11017 |
compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); |
11018 |
compilerOptions15.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); |
11019 |
this.runConformTest( |
11020 |
new String[] { |
11021 |
"Y.java", |
11022 |
"public abstract class Y implements I<Y> {\n" + |
11023 |
" public final Y foo(Object o, J<Y> j) {\n" + |
11024 |
" return null;\n" + |
11025 |
" }\n" + |
11026 |
" public final void bar(Object o, J<Y> j, Y y) {\n" + |
11027 |
" }\n" + |
11028 |
"}", |
11029 |
"I.java", |
11030 |
"public interface I<S> {\n" + |
11031 |
" public S foo(Object o, J<S> j);\n" + |
11032 |
" public void bar(Object o, J<S> j, S s);\n" + |
11033 |
"}", |
11034 |
"J.java", |
11035 |
"public interface J<S> {}" |
11036 |
}, |
11037 |
"", |
11038 |
null, |
11039 |
true, |
11040 |
null, |
11041 |
compilerOptions15, |
11042 |
null); |
11043 |
|
11044 |
Map compilerOptions14 = getCompilerOptions(); |
11045 |
compilerOptions14.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2); |
11046 |
compilerOptions14.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); |
11047 |
compilerOptions14.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3); |
11048 |
this.runConformTest( |
11049 |
new String[] { |
11050 |
"X.java", |
11051 |
"public class X {\n" + |
11052 |
" public Object foo() {\n" + |
11053 |
" return new Y() {};\n" + |
11054 |
" }\n" + |
11055 |
"}" |
11056 |
}, |
11057 |
"", |
11058 |
null, |
11059 |
false, |
11060 |
null, |
11061 |
compilerOptions14, |
11062 |
null); |
11063 |
} |
11012 |
} |
11064 |
} |