View | Details | Raw Unified | Return to bug 342671 | Differences between
and this patch

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java (-4 / +10 lines)
Lines 1523-1530 Link Here
1523
						return null;
1523
						return null;
1524
					}
1524
					}
1525
					ArrayType arrayType = (ArrayType) type;
1525
					ArrayType arrayType = (ArrayType) type;
1526
					ArrayBinding arrayBinding = (ArrayBinding) typeBinding;
1526
					if (typeBinding.isArrayType()) {
1527
					return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
1527
						ArrayBinding arrayBinding = (ArrayBinding) typeBinding;
1528
						return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
1529
					}
1530
					return getTypeBinding(this.scope.createArrayType(typeBinding, arrayType.getDimensions()));
1528
				}
1531
				}
1529
				if (typeBinding.isArrayType()) {
1532
				if (typeBinding.isArrayType()) {
1530
					typeBinding = ((ArrayBinding) typeBinding).leafComponentType;
1533
					typeBinding = ((ArrayBinding) typeBinding).leafComponentType;
Lines 1564-1571 Link Here
1564
					if (this.scope == null) {
1567
					if (this.scope == null) {
1565
						return null;
1568
						return null;
1566
					}
1569
					}
1567
					ArrayBinding arrayBinding = (ArrayBinding) binding;
1570
					if (binding.isArrayType()) {
1568
					return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
1571
						ArrayBinding arrayBinding = (ArrayBinding) binding;
1572
						return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
1573
					}
1574
					return getTypeBinding(this.scope.createArrayType(binding, arrayType.getDimensions()));
1569
				} else if (binding.isArrayType()) {
1575
				} else if (binding.isArrayType()) {
1570
					ArrayBinding arrayBinding = (ArrayBinding) binding;
1576
					ArrayBinding arrayBinding = (ArrayBinding) binding;
1571
					return getTypeBinding(arrayBinding.leafComponentType);
1577
					return getTypeBinding(arrayBinding.leafComponentType);
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java (-1 / +21 lines)
Lines 47-53 Link Here
47
	}
47
	}
48
48
49
	static {
49
	static {
50
//		TESTS_NUMBERS = new int[] { 350 };
50
//		TESTS_NUMBERS = new int[] { 351, 352 };
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 11284-11287 Link Here
11284
		assertTrue("Should be seen as a wildcard (really an intersection type)", binding.isWildcardType());
11284
		assertTrue("Should be seen as a wildcard (really an intersection type)", binding.isWildcardType());
11285
		assertNull("should be null", binding.getGenericTypeOfWildcardType());
11285
		assertNull("should be null", binding.getGenericTypeOfWildcardType());
11286
	}
11286
	}
11287
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=342671
11288
	public void test0351() throws JavaModelException {
11289
		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0351", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
11290
		ASTNode result = runJLS3Conversion(sourceUnit, true, true);
11291
		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
11292
		CompilationUnit unit = (CompilationUnit) result;
11293
		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 0);
11294
		ITypeBinding typeBinding = methodDeclaration.getReturnType2().resolveBinding();
11295
		assertEquals("Wrong fully qualified name", "test0351.I1[]", typeBinding.getQualifiedName());
11296
	}
11297
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=342671
11298
	public void test0352() throws JavaModelException {
11299
		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0352", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
11300
		ASTNode result = runJLS3Conversion(sourceUnit, true, true);
11301
		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
11302
		CompilationUnit unit = (CompilationUnit) result;
11303
		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 0);
11304
		ITypeBinding typeBinding = methodDeclaration.getReturnType2().resolveBinding();
11305
		assertEquals("Wrong fully qualified name", "test0352.I1[]", typeBinding.getQualifiedName());
11306
	}
11287
}
11307
}
(-)workspace/Converter15/src/test0351/I0.java (+4 lines)
Added Link Here
1
package test0351;
2
3
public interface I0<T> {
4
}
(-)workspace/Converter15/src/test0351/I1.java (+4 lines)
Added Link Here
1
package test0351;
2
3
public interface I1 extends I0<X<?>> {
4
}
(-)workspace/Converter15/src/test0351/I2.java (+5 lines)
Added Link Here
1
package test0351;
2
3
public interface I2<T extends I0<?>> {
4
	public T[] getIndications();
5
}
(-)workspace/Converter15/src/test0351/X.java (+7 lines)
Added Link Here
1
package test0351;
2
3
public class X<T> {
4
	public I1<T>[] f() {
5
		return null;
6
	}
7
}
(-)workspace/Converter15/src/test0352/I0.java (+4 lines)
Added Link Here
1
package test0352;
2
3
public interface I0<T> {
4
}
(-)workspace/Converter15/src/test0352/I1.java (+4 lines)
Added Link Here
1
package test0352;
2
3
public interface I1 extends I0<X<?>> {
4
}
(-)workspace/Converter15/src/test0352/I2.java (+5 lines)
Added Link Here
1
package test0352;
2
3
public interface I2<T extends I0<?>> {
4
	public T[] getIndications();
5
}
(-)workspace/Converter15/src/test0352/X.java (+7 lines)
Added Link Here
1
package test0352;
2
3
public class X<T> {
4
	public test0352.I1<T>[] f() {
5
		return null;
6
	}
7
}

Return to bug 342671