Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 47-53
Link Here
|
47 |
} |
47 |
} |
48 |
|
48 |
|
49 |
static { |
49 |
static { |
50 |
// TESTS_NUMBERS = new int[] { 345, 346 }; |
50 |
// TESTS_NUMBERS = new int[] { 347 }; |
51 |
// TESTS_RANGE = new int[] { 325, -1 }; |
51 |
// TESTS_RANGE = new int[] { 325, -1 }; |
52 |
// TESTS_NAMES = new String[] {"test0204"}; |
52 |
// TESTS_NAMES = new String[] {"test0204"}; |
53 |
} |
53 |
} |
Lines 11156-11159
Link Here
|
11156 |
assertEquals("Wrong constant value", "a", constantValue); |
11156 |
assertEquals("Wrong constant value", "a", constantValue); |
11157 |
} |
11157 |
} |
11158 |
|
11158 |
|
|
|
11159 |
/* |
11160 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=333360 |
11161 |
*/ |
11162 |
public void test0347() throws JavaModelException { |
11163 |
this.workingCopy = getWorkingCopy("/Converter15/src/test0347/X.java", true/*resolve*/); |
11164 |
String contents = |
11165 |
"package test0347;\n" + |
11166 |
"public class X implements One</*start*/Outer<Integer>.Inner<Double>[]/*end*/> {\n" + |
11167 |
"}\n" + |
11168 |
"interface One<T> {}\n" + |
11169 |
"class Outer<T> {\n" + |
11170 |
" public class Inner<S> {}\n" + |
11171 |
"}"; |
11172 |
ArrayType type = (ArrayType) buildAST( |
11173 |
contents, |
11174 |
this.workingCopy); |
11175 |
assertNotNull("No annotation", type); |
11176 |
ITypeBinding binding = type.resolveBinding(); |
11177 |
assertNotNull("No binding", binding); |
11178 |
assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>[]", binding.getQualifiedName()); |
11179 |
Type componentType = type.getComponentType(); |
11180 |
binding = componentType.resolveBinding(); |
11181 |
assertNotNull("No binding", binding); |
11182 |
assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName()); |
11183 |
assertTrue("Not parameterized", componentType.isParameterizedType()); |
11184 |
ParameterizedType parameterizedType = (ParameterizedType) componentType; |
11185 |
Type type2 = parameterizedType.getType(); |
11186 |
assertTrue("Not qualified", type2.isQualifiedType()); |
11187 |
QualifiedType qualifiedType = (QualifiedType) type2; |
11188 |
binding = qualifiedType.resolveBinding(); |
11189 |
assertNotNull("No binding", binding); |
11190 |
assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName()); |
11191 |
Type qualifier = qualifiedType.getQualifier(); |
11192 |
assertTrue("Not parameterized", qualifier.isParameterizedType()); |
11193 |
binding = qualifier.resolveBinding(); |
11194 |
assertNotNull("No binding", binding); |
11195 |
assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>", binding.getQualifiedName()); |
11196 |
parameterizedType = (ParameterizedType) qualifier; |
11197 |
type2 = parameterizedType.getType(); |
11198 |
assertTrue("Not simple type", type2.isSimpleType()); |
11199 |
binding = type2.resolveBinding(); |
11200 |
assertNotNull("No binding", binding); |
11201 |
assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>", binding.getQualifiedName()); |
11202 |
} |
11159 |
} |
11203 |
} |