Lines 39-45
Link Here
|
39 |
} |
39 |
} |
40 |
|
40 |
|
41 |
static { |
41 |
static { |
42 |
// TESTS_NUMBERS = new int[] { 191 }; |
42 |
TESTS_NUMBERS = new int[] { 192 }; |
43 |
// TESTS_NAMES = new String[] {"test0189"}; |
43 |
// TESTS_NAMES = new String[] {"test0189"}; |
44 |
} |
44 |
} |
45 |
public static Test suite() { |
45 |
public static Test suite() { |
Lines 5747-5750
Link Here
|
5747 |
assertNotNull("No binding", typeBinding2); |
5747 |
assertNotNull("No binding", typeBinding2); |
5748 |
assertTrue("Not cast compatible", typeBinding2.isCastCompatible(typeBinding)); |
5748 |
assertTrue("Not cast compatible", typeBinding2.isCastCompatible(typeBinding)); |
5749 |
} |
5749 |
} |
|
|
5750 |
|
5751 |
// Wrong ParameterizedTypeBinding yields null type declaration result |
5752 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100584 |
5753 |
public void test0192() throws JavaModelException { |
5754 |
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); |
5755 |
String contents = |
5756 |
"public class X<E> {\n" + |
5757 |
" public static class InnerClass {\n" + |
5758 |
" static class InnerInnerClass {\n" + |
5759 |
" /*start*/X.WrongInnerClass/*end*/.InnerInnerClass m;\n" + |
5760 |
" }\n" + |
5761 |
" }\n" + |
5762 |
"}"; |
5763 |
IBinding[] bindings = resolveBindings(contents, this.workingCopy); |
5764 |
if (bindings[0] != null) { |
5765 |
// should not get here if patch 100584 applied |
5766 |
try { |
5767 |
bindings[0].toString(); |
5768 |
fail("should get an exception if bug 100584 present"); |
5769 |
// which means that the code would now return a non null, |
5770 |
// erroneous binding, yet able to respond to toString |
5771 |
} catch (Throwable t) {/* absorb quietly */} |
5772 |
} |
5773 |
assertTrue("should yield a null, not a malformed binding", |
5774 |
bindings[0] == null); |
5775 |
} |
5750 |
} |
5776 |
} |