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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 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 570-575 Link Here
570
570
571
		// If no param tags then report a problem for each declaration type parameter
571
		// If no param tags then report a problem for each declaration type parameter
572
		if (parameters != null) {
572
		if (parameters != null) {
573
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, avoid secondary errors when <= 1.4 
574
			reportMissing = reportMissing && scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
573
			int typeParametersLength = parameters.length;
575
			int typeParametersLength = parameters.length;
574
			if (paramTypeParamLength == 0) {
576
			if (paramTypeParamLength == 0) {
575
				if (reportMissing) {
577
				if (reportMissing) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java (-1 / +1 lines)
Lines 229-235 Link Here
229
229
230
			    TypeVariableBinding[] typeVariables = currentOriginal.typeVariables();
230
			    TypeVariableBinding[] typeVariables = currentOriginal.typeVariables();
231
				if (typeVariables == Binding.NO_TYPE_VARIABLES) { // check generic
231
				if (typeVariables == Binding.NO_TYPE_VARIABLES) { // check generic
232
					if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { // below 1.5, already reported as syntax error
232
					if (scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_5) { // below 1.5, already reported as syntax error
233
						scope.problemReporter().nonGenericTypeCannotBeParameterized(i, this, currentType, argTypes);
233
						scope.problemReporter().nonGenericTypeCannotBeParameterized(i, this, currentType, argTypes);
234
						return null;
234
						return null;
235
					}
235
					}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 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 195-201 Link Here
195
195
196
		TypeVariableBinding[] typeVariables = currentOriginal.typeVariables();
196
		TypeVariableBinding[] typeVariables = currentOriginal.typeVariables();
197
		if (typeVariables == Binding.NO_TYPE_VARIABLES) { // non generic invoked with arguments
197
		if (typeVariables == Binding.NO_TYPE_VARIABLES) { // non generic invoked with arguments
198
			boolean isCompliant15 = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
198
			boolean isCompliant15 = scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_5;
199
			if ((currentOriginal.tagBits & TagBits.HasMissingType) == 0) {
199
			if ((currentOriginal.tagBits & TagBits.HasMissingType) == 0) {
200
				if (isCompliant15) { // below 1.5, already reported as syntax error
200
				if (isCompliant15) { // below 1.5, already reported as syntax error
201
					this.resolvedType = currentType;
201
					this.resolvedType = currentType;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java (-8 / +21 lines)
Lines 149-155 Link Here
149
	this.fPackage = packageBinding;
149
	this.fPackage = packageBinding;
150
	this.fileName = binaryType.getFileName();
150
	this.fileName = binaryType.getFileName();
151
151
152
	char[] typeSignature = environment.globalOptions.originalSourceLevel >= ClassFileConstants.JDK1_5 ? binaryType.getGenericSignature() : null;
152
	/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we
153
	   must internalize type variables and observe any parameterization of super class
154
	   and/or super interfaces in order to be able to detect overriding in the presence
155
	   of generics.
156
	 */
157
	char[] typeSignature = binaryType.getGenericSignature();
153
	this.typeVariables = typeSignature != null && typeSignature.length > 0 && typeSignature[0] == '<'
158
	this.typeVariables = typeSignature != null && typeSignature.length > 0 && typeSignature[0] == '<'
154
		? null // is initialized in cachePartsFrom (called from LookupEnvironment.createBinaryTypeFrom())... must set to null so isGenericType() answers true
159
		? null // is initialized in cachePartsFrom (called from LookupEnvironment.createBinaryTypeFrom())... must set to null so isGenericType() answers true
155
		: Binding.NO_TYPE_VARIABLES;
160
		: Binding.NO_TYPE_VARIABLES;
Lines 261-271 Link Here
261
		}
266
		}
262
267
263
		long sourceLevel = this.environment.globalOptions.originalSourceLevel;
268
		long sourceLevel = this.environment.globalOptions.originalSourceLevel;
264
		char[] typeSignature = null;
269
		/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we
265
		if (sourceLevel >= ClassFileConstants.JDK1_5) {
270
		   must internalize type variables and observe any parameterization of super class
266
			typeSignature = binaryType.getGenericSignature();
271
		   and/or super interfaces in order to be able to detect overriding in the presence
267
			this.tagBits |= binaryType.getTagBits();
272
		   of generics.
268
		}
273
		 */
274
		char[] typeSignature = binaryType.getGenericSignature(); // use generic signature even in 1.4
275
		this.tagBits |= binaryType.getTagBits();
276
		
269
		char[][][] missingTypeNames = binaryType.getMissingTypeNames();
277
		char[][][] missingTypeNames = binaryType.getMissingTypeNames();
270
		if (typeSignature == null) {
278
		if (typeSignature == null) {
271
			char[] superclassName = binaryType.getSuperclassName();
279
			char[] superclassName = binaryType.getSuperclassName();
Lines 412-418 Link Here
412
	TypeBinding returnType = null;
420
	TypeBinding returnType = null;
413
421
414
	final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
422
	final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
415
	char[] methodSignature = use15specifics ? method.getGenericSignature() : null;
423
	/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, Since a 1.4 project can have a 1.5
424
	   type as a super type and the 1.5 type could be generic, we must internalize usages of type
425
	   variables properly in order to be able to apply substitutions and thus be able to detect
426
	   overriding in the presence of generics. Seeing the erased form is not good enough.
427
	 */
428
	char[] methodSignature = method.getGenericSignature(); // always use generic signature, even in 1.4
416
	if (methodSignature == null) { // no generics
429
	if (methodSignature == null) { // no generics
417
		char[] methodDescriptor = method.getMethodDescriptor();   // of the form (I[Ljava/jang/String;)V
430
		char[] methodDescriptor = method.getMethodDescriptor();   // of the form (I[Ljava/jang/String;)V
418
		int numOfParams = 0;
431
		int numOfParams = 0;
Lines 476-482 Link Here
476
	} else {
489
	} else {
477
		methodModifiers |= ExtraCompilerModifiers.AccGenericSignature;
490
		methodModifiers |= ExtraCompilerModifiers.AccGenericSignature;
478
		// MethodTypeSignature = ParameterPart(optional) '(' TypeSignatures ')' return_typeSignature ['^' TypeSignature (optional)]
491
		// MethodTypeSignature = ParameterPart(optional) '(' TypeSignatures ')' return_typeSignature ['^' TypeSignature (optional)]
479
		SignatureWrapper wrapper = new SignatureWrapper(methodSignature);
492
		SignatureWrapper wrapper = new SignatureWrapper(methodSignature, use15specifics);
480
		if (wrapper.signature[wrapper.start] == '<') {
493
		if (wrapper.signature[wrapper.start] == '<') {
481
			// <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)TA;
494
			// <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)TA;
482
			// ParameterPart = '<' ParameterSignature(s) '>'
495
			// ParameterPart = '<' ParameterSignature(s) '>'
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java (-3 / +2 lines)
Lines 384-392 Link Here
384
384
385
	    SourceTypeBinding sourceType = this.referenceContext.binding;
385
	    SourceTypeBinding sourceType = this.referenceContext.binding;
386
		TypeParameter[] typeParameters = this.referenceContext.typeParameters;
386
		TypeParameter[] typeParameters = this.referenceContext.typeParameters;
387
387
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level.
388
	    // do not construct type variables if source < 1.5
388
		if (typeParameters == null || typeParameters.length == 0) {
389
		if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) {
390
		    sourceType.typeVariables = Binding.NO_TYPE_VARIABLES;
389
		    sourceType.typeVariables = Binding.NO_TYPE_VARIABLES;
391
		    return;
390
		    return;
392
		}
391
		}
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java (-3 / +6 lines)
Lines 1322-1330 Link Here
1322
}
1322
}
1323
1323
1324
public MethodVerifier newMethodVerifier() {
1324
public MethodVerifier newMethodVerifier() {
1325
	return this.globalOptions.sourceLevel < ClassFileConstants.JDK1_5
1325
	/* Always use MethodVerifier15. Even in a 1.4 project, we must internalize type variables and
1326
		? new MethodVerifier(this)
1326
	   observe any parameterization of super class and/or super interfaces in order to be able to
1327
		: new MethodVerifier15(this); // covariance only if sourceLevel is >= 1.5
1327
	   detect overriding in the presence of generics.
1328
	   See https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850
1329
	 */
1330
	return new MethodVerifier15(this);
1328
}
1331
}
1329
1332
1330
public void releaseClassFiles(org.eclipse.jdt.internal.compiler.ClassFile[] classFiles) {
1333
public void releaseClassFiles(org.eclipse.jdt.internal.compiler.ClassFile[] classFiles) {
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java (-2 / +2 lines)
Lines 329-336 Link Here
329
	}
329
	}
330
330
331
	TypeParameter[] typeParameters = method.typeParameters();
331
	TypeParameter[] typeParameters = method.typeParameters();
332
    // do not construct type variables if source < 1.5
332
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level.
333
	if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) {
333
    if (typeParameters == null || typeParameters.length == 0) {
334
	    method.binding.typeVariables = Binding.NO_TYPE_VARIABLES;
334
	    method.binding.typeVariables = Binding.NO_TYPE_VARIABLES;
335
	} else {
335
	} else {
336
		method.binding.typeVariables = createTypeVariables(typeParameters, method.binding);
336
		method.binding.typeVariables = createTypeVariables(typeParameters, method.binding);
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java (-1 / +6 lines)
Lines 11-16 Link Here
11
package org.eclipse.jdt.internal.compiler.lookup;
11
package org.eclipse.jdt.internal.compiler.lookup;
12
12
13
import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
13
import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
14
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
14
import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
15
import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
15
import org.eclipse.jdt.internal.compiler.util.SimpleSet;
16
import org.eclipse.jdt.internal.compiler.util.SimpleSet;
16
17
Lines 80-86 Link Here
80
}
81
}
81
boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two) {
82
boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two) {
82
	if (one.returnType == two.returnType) return true;
83
	if (one.returnType == two.returnType) return true;
83
	return areReturnTypesCompatible0(one, two);
84
	if (this.type.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
85
		return areReturnTypesCompatible0(one, two);
86
	} else {
87
		return areTypesEqual(one.returnType.erasure(), two.returnType.erasure());
88
	}
84
}
89
}
85
boolean areTypesEqual(TypeBinding one, TypeBinding two) {
90
boolean areTypesEqual(TypeBinding one, TypeBinding two) {
86
	if (one == two) return true;
91
	if (one == two) return true;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java (-2 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 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 15-20 Link Here
15
import org.eclipse.jdt.core.compiler.CharOperation;
15
import org.eclipse.jdt.core.compiler.CharOperation;
16
import org.eclipse.jdt.internal.compiler.ast.TypeReference;
16
import org.eclipse.jdt.internal.compiler.ast.TypeReference;
17
import org.eclipse.jdt.internal.compiler.ast.Wildcard;
17
import org.eclipse.jdt.internal.compiler.ast.Wildcard;
18
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
18
19
19
/**
20
/**
20
 * A parameterized type encapsulates a type with type arguments,
21
 * A parameterized type encapsulates a type with type arguments,
Lines 860-866 Link Here
860
			// arity check
861
			// arity check
861
			TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables();
862
			TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables();
862
			if (refTypeVariables == Binding.NO_TYPE_VARIABLES) { // check generic
863
			if (refTypeVariables == Binding.NO_TYPE_VARIABLES) { // check generic
863
				if ((resolvedType.tagBits & TagBits.HasMissingType) == 0) {
864
				// Below 1.5, we should have already complained about the use of type parameters.
865
				boolean isCompliant15 = this.environment.globalOptions.originalSourceLevel >= ClassFileConstants.JDK1_5;
866
				if (isCompliant15 && (resolvedType.tagBits & TagBits.HasMissingType) == 0) {
864
					this.environment.problemReporter.nonGenericTypeCannotBeParameterized(0, null, resolvedType, this.arguments);
867
					this.environment.problemReporter.nonGenericTypeCannotBeParameterized(0, null, resolvedType, this.arguments);
865
				}
868
				}
866
				return this;
869
				return this;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java (-1 / +1 lines)
Lines 126-132 Link Here
126
	}
126
	}
127
127
128
    public boolean isEquivalentTo(TypeBinding otherType) {
128
    public boolean isEquivalentTo(TypeBinding otherType) {
129
		if (this == otherType)
129
		if (this == otherType || erasure() == otherType)
130
		    return true;
130
		    return true;
131
	    if (otherType == null)
131
	    if (otherType == null)
132
	        return false;
132
	        return false;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java (-2 / +2 lines)
Lines 704-711 Link Here
704
	}
704
	}
705
705
706
	public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters, Binding declaringElement) {
706
	public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters, Binding declaringElement) {
707
		// do not construct type variables if source < 1.5
707
		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level.
708
		if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5)
708
		if (typeParameters == null || typeParameters.length == 0)
709
			return Binding.NO_TYPE_VARIABLES;
709
			return Binding.NO_TYPE_VARIABLES;
710
710
711
		PackageBinding unitPackage = compilationUnitScope().fPackage;
711
		PackageBinding unitPackage = compilationUnitScope().fPackage;
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java (-3 / +32 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 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 17-27 Link Here
17
	public int start;
17
	public int start;
18
	public int end;
18
	public int end;
19
	public int bracket;
19
	public int bracket;
20
	private boolean use15specifics;
20
21
21
	public SignatureWrapper(char[] signature) {
22
	public SignatureWrapper(char[] signature, boolean use15specifics) {
22
		this.signature = signature;
23
		this.signature = signature;
23
		this.start = 0;
24
		this.start = 0;
24
		this.end = this.bracket = -1;
25
		this.end = this.bracket = -1;
26
		this.use15specifics = use15specifics;
27
	}
28
	public SignatureWrapper(char [] signature) {
29
		this(signature, true);
25
	}
30
	}
26
	public boolean atEnd() {
31
	public boolean atEnd() {
27
		return this.start < 0 || this.start >= this.signature.length;
32
		return this.start < 0 || this.start >= this.signature.length;
Lines 46-54 Link Here
46
				this.end = this.start;
51
				this.end = this.start;
47
		}
52
		}
48
53
49
		this.start = this.end + 1; // skip ';'
54
		if (this.use15specifics || this.end != this.bracket) {
55
			this.start = this.end + 1; // skip ';'
56
		} else {
57
			this.start = skipAngleContents(this.end) + 1;  // skip <<>*>;
58
			this.bracket = -1;
59
		}
50
		return this.end;
60
		return this.end;
51
	}
61
	}
62
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, do not expose generics if we shouldn't
63
	public int skipAngleContents(int i) {
64
		if (this.signature[i] != '<') {
65
			return i;
66
		}
67
		int depth = 0, length = this.signature.length;
68
		for (++i; i < length; i++) {
69
			switch(this.signature[i]) {
70
				case '<' :
71
					depth++;
72
					break;
73
				case '>' :
74
					if (--depth < 0)
75
						return i + 1;
76
					break;
77
			}
78
		}
79
		return i;
80
	}
52
	public char[] nextWord() {
81
	public char[] nextWord() {
53
		this.end = CharOperation.indexOf(';', this.signature, this.start);
82
		this.end = CharOperation.indexOf(';', this.signature, this.start);
54
		if (this.bracket <= this.start) // already know it if its > start
83
		if (this.bracket <= this.start) // already know it if its > start
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+4 lines)
Lines 1850-1855 Link Here
1850
		currentMethod.sourceEnd());
1850
		currentMethod.sourceEnd());
1851
}
1851
}
1852
public void finalVariableBound(TypeVariableBinding typeVariable, TypeReference typeRef) {
1852
public void finalVariableBound(TypeVariableBinding typeVariable, TypeReference typeRef) {
1853
	if (this.options.sourceLevel < ClassFileConstants.JDK1_5) return;
1853
	int severity = computeSeverity(IProblem.FinalBoundForTypeVariable);
1854
	int severity = computeSeverity(IProblem.FinalBoundForTypeVariable);
1854
	if (severity == ProblemSeverities.Ignore) return;
1855
	if (severity == ProblemSeverities.Ignore) return;
1855
	this.handle(
1856
	this.handle(
Lines 7083-7088 Link Here
7083
    }
7084
    }
7084
}
7085
}
7085
public void unsafeReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod, SourceTypeBinding type) {
7086
public void unsafeReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod, SourceTypeBinding type) {
7087
	if (this.options.sourceLevel < ClassFileConstants.JDK1_5) {
7088
		return;
7089
	}
7086
	int severity = computeSeverity(IProblem.UnsafeReturnTypeOverride);
7090
	int severity = computeSeverity(IProblem.UnsafeReturnTypeOverride);
7087
	if (severity == ProblemSeverities.Ignore) return;
7091
	if (severity == ProblemSeverities.Ignore) return;
7088
	int start = type.sourceStart();
7092
	int start = type.sourceStart();
(-)model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java (-28 / +29 lines)
Lines 291-311 Link Here
291
		int start = methodInfo.getNameSourceStart();
291
		int start = methodInfo.getNameSourceStart();
292
		int end = methodInfo.getNameSourceEnd();
292
		int end = methodInfo.getNameSourceEnd();
293
293
294
		// convert 1.5 specific constructs only if compliance is 1.5 or above
294
		/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, Even when this type is being constructed
295
		   on behalf of a 1.4 project we must internalize type variables properly in order to be able to
296
		   recognize usages of them in the method signature, to apply substitutions and thus to be able to
297
		   detect overriding in the presence of generics. If we simply drop them, when the method signature
298
		   refers to the type parameter, we won't know it should be bound to the type parameter and perform
299
		   incorrect lookup and may mistakenly end up with missing types
300
		 */
295
		TypeParameter[] typeParams = null;
301
		TypeParameter[] typeParams = null;
296
		// Digest type parameters if compliance level of current project or its prerequisite is >= 1.5
302
		char[][] typeParameterNames = methodInfo.getTypeParameterNames();
297
		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=305259
303
		if (typeParameterNames != null) {
298
		if (this.has1_5Compliance || this.problemReporter.options.complianceLevel >= ClassFileConstants.JDK1_5) {
304
			int parameterCount = typeParameterNames.length;
299
			/* convert type parameters */
305
			if (parameterCount > 0) { // method's type parameters must be null if no type parameter
300
			char[][] typeParameterNames = methodInfo.getTypeParameterNames();
306
				char[][][] typeParameterBounds = methodInfo.getTypeParameterBounds();
301
			if (typeParameterNames != null) {
307
				typeParams = new TypeParameter[parameterCount];
302
				int parameterCount = typeParameterNames.length;
308
				for (int i = 0; i < parameterCount; i++) {
303
				if (parameterCount > 0) { // method's type parameters must be null if no type parameter
309
					typeParams[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end);
304
					char[][][] typeParameterBounds = methodInfo.getTypeParameterBounds();
305
					typeParams = new TypeParameter[parameterCount];
306
					for (int i = 0; i < parameterCount; i++) {
307
						typeParams[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end);
308
					}
309
				}
310
				}
310
			}
311
			}
311
		}
312
		}
Lines 465-488 Link Here
465
			/* convert annotations */
466
			/* convert annotations */
466
			type.annotations = convertAnnotations(typeHandle);
467
			type.annotations = convertAnnotations(typeHandle);
467
		}
468
		}
468
		// Digest type parameters if compliance level of current project or its prerequisite is >= 1.5
469
		/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we
469
		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=305259
470
		   must internalize type variables and observe any parameterization of super class
470
		if (this.has1_5Compliance || this.problemReporter.options.complianceLevel >= ClassFileConstants.JDK1_5) {
471
		   and/or super interfaces in order to be able to detect overriding in the presence
471
			/* convert type parameters */
472
		   of generics.
472
			char[][] typeParameterNames = typeInfo.getTypeParameterNames();
473
		 */
473
			if (typeParameterNames.length > 0) {
474
		char[][] typeParameterNames = typeInfo.getTypeParameterNames();
474
				int parameterCount = typeParameterNames.length;
475
		if (typeParameterNames.length > 0) {
475
				char[][][] typeParameterBounds = typeInfo.getTypeParameterBounds();
476
			int parameterCount = typeParameterNames.length;
476
				type.typeParameters = new TypeParameter[parameterCount];
477
			char[][][] typeParameterBounds = typeInfo.getTypeParameterBounds();
477
				for (int i = 0; i < parameterCount; i++) {
478
			type.typeParameters = new TypeParameter[parameterCount];
478
					type.typeParameters[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end);
479
			for (int i = 0; i < parameterCount; i++) {
479
				}
480
				type.typeParameters[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end);
480
			}
481
			}
481
		}
482
		}
482
483
483
		/* set superclass and superinterfaces */
484
		/* set superclass and superinterfaces */
484
		if (typeInfo.getSuperclassName() != null) {
485
		if (typeInfo.getSuperclassName() != null) {
485
			type.superclass = createTypeReference(typeInfo.getSuperclassName(), start, end);
486
			type.superclass = createTypeReference(typeInfo.getSuperclassName(), start, end, true /* include generics */);
486
			type.superclass.bits |= ASTNode.IsSuperType;
487
			type.superclass.bits |= ASTNode.IsSuperType;
487
		}
488
		}
488
		char[][] interfaceNames = typeInfo.getInterfaceNames();
489
		char[][] interfaceNames = typeInfo.getInterfaceNames();
Lines 490-496 Link Here
490
		if (interfaceCount > 0) {
491
		if (interfaceCount > 0) {
491
			type.superInterfaces = new TypeReference[interfaceCount];
492
			type.superInterfaces = new TypeReference[interfaceCount];
492
			for (int i = 0; i < interfaceCount; i++) {
493
			for (int i = 0; i < interfaceCount; i++) {
493
				type.superInterfaces[i] = createTypeReference(interfaceNames[i], start, end);
494
				type.superInterfaces[i] = createTypeReference(interfaceNames[i], start, end, true /* include generics */);
494
				type.superInterfaces[i].bits |= ASTNode.IsSuperType;
495
				type.superInterfaces[i].bits |= ASTNode.IsSuperType;
495
			}
496
			}
496
		}
497
		}
(-)model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java (-14 / +32 lines)
Lines 107-117 Link Here
107
	protected TypeReference createTypeReference(
107
	protected TypeReference createTypeReference(
108
		char[] typeName,
108
		char[] typeName,
109
		int start,
109
		int start,
110
		int end,
111
		boolean includeGenericsAnyway) {
112
113
		int length = typeName.length;
114
		this.namePos = 0;
115
		return decodeType(typeName, length, start, end, true);
116
	}
117
118
	/*
119
	 * Build a type reference from a readable name, e.g. java.lang.Object[][]
120
	 */
121
	protected TypeReference createTypeReference(
122
		char[] typeName,
123
		int start,
110
		int end) {
124
		int end) {
111
125
112
		int length = typeName.length;
126
		int length = typeName.length;
113
		this.namePos = 0;
127
		this.namePos = 0;
114
		return decodeType(typeName, length, start, end);
128
		return decodeType(typeName, length, start, end, false);
115
	}
129
	}
116
130
117
	/*
131
	/*
Lines 351-357 Link Here
351
		}
365
		}
352
	}
366
	}
353
367
354
	private TypeReference decodeType(char[] typeName, int length, int start, int end) {
368
	private TypeReference decodeType(char[] typeName, int length, int start, int end, boolean includeGenericsAnyway) {
355
		int identCount = 1;
369
		int identCount = 1;
356
		int dim = 0;
370
		int dim = 0;
357
		int nameFragmentStart = this.namePos, nameFragmentEnd = -1;
371
		int nameFragmentStart = this.namePos, nameFragmentEnd = -1;
Lines 373-379 Link Here
373
								}
387
								}
374
								this.namePos += max;
388
								this.namePos += max;
375
								Wildcard result = new Wildcard(Wildcard.SUPER);
389
								Wildcard result = new Wildcard(Wildcard.SUPER);
376
								result.bound = decodeType(typeName, length, start, end);
390
								result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway);
377
								result.sourceStart = start;
391
								result.sourceStart = start;
378
								result.sourceEnd = end;
392
								result.sourceEnd = end;
379
								return result;
393
								return result;
Lines 389-395 Link Here
389
								}
403
								}
390
								this.namePos += max;
404
								this.namePos += max;
391
								Wildcard result = new Wildcard(Wildcard.EXTENDS);
405
								Wildcard result = new Wildcard(Wildcard.EXTENDS);
392
								result.bound = decodeType(typeName, length, start, end);
406
								result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway);
393
								result.sourceStart = start;
407
								result.sourceStart = start;
394
								result.sourceEnd = end;
408
								result.sourceEnd = end;
395
								return result;
409
								return result;
Lines 414-436 Link Here
414
					identCount ++;
428
					identCount ++;
415
					break;
429
					break;
416
				case '<' :
430
				case '<' :
417
					/* We need to convert and preserve 1.5 specific constructs only if compliance is 1.5 or above,
431
					/* We need to convert and preserve 1.5 specific constructs either if compliance is 1.5 or above,
418
					   but in all cases, we must skip over them to see if there are any applicable type fragments
432
					   or the caller has explicitly requested generics to be included. The parameter includeGenericsAnyway
419
					   after the type parameters: i.e we just aren't done having seen a '<' in 1.4 mode. Because of
433
					   should be used by the caller to signal that in the calling context generics information must be 
420
					   the way type signatures are encoded, TypeConverter.decodeType(String, int, int, int) is immune
434
					   internalized even when the requesting project is 1.4. But in all cases, we must skip over them to
435
					   see if there are any applicable type fragments after the type parameters: i.e we just aren't done
436
					   having seen a '<' in 1.4 mode. 
437
					   
438
					   Because of the way type signatures are encoded, TypeConverter.decodeType(String, int, int, int) is immune
421
					   to this problem. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=325633
439
					   to this problem. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=325633
422
					 */
440
					 */
423
					if (this.has1_5Compliance) {
441
					if (this.has1_5Compliance || includeGenericsAnyway) {
424
						if (fragments == null) fragments = new ArrayList(2);
442
						if (fragments == null) fragments = new ArrayList(2);
425
					}
443
					}
426
					nameFragmentEnd = this.namePos-1;
444
					nameFragmentEnd = this.namePos-1;
427
					if (this.has1_5Compliance) {
445
					if (this.has1_5Compliance || includeGenericsAnyway) {
428
						char[][] identifiers = CharOperation.splitOn('.', typeName, nameFragmentStart, this.namePos);
446
						char[][] identifiers = CharOperation.splitOn('.', typeName, nameFragmentStart, this.namePos);
429
						fragments.add(identifiers);
447
						fragments.add(identifiers);
430
					}
448
					}
431
					this.namePos++; // skip '<'
449
					this.namePos++; // skip '<'
432
					TypeReference[] arguments = decodeTypeArguments(typeName, length, start, end); // positionned on '>' at end
450
					TypeReference[] arguments = decodeTypeArguments(typeName, length, start, end, includeGenericsAnyway); // positionned on '>' at end
433
					if (this.has1_5Compliance) {
451
					if (this.has1_5Compliance || includeGenericsAnyway) {
434
						fragments.add(arguments);
452
						fragments.add(arguments);
435
						identCount = 0;
453
						identCount = 0;
436
						nameFragmentStart = -1;
454
						nameFragmentStart = -1;
Lines 519-529 Link Here
519
		}
537
		}
520
	}
538
	}
521
539
522
	private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end) {
540
	private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end, boolean includeGenericsAnyway) {
523
		ArrayList argumentList = new ArrayList(1);
541
		ArrayList argumentList = new ArrayList(1);
524
		int count = 0;
542
		int count = 0;
525
		argumentsLoop: while (this.namePos < length) {
543
		argumentsLoop: while (this.namePos < length) {
526
			TypeReference argument = decodeType(typeName, length, start, end);
544
			TypeReference argument = decodeType(typeName, length, start, end, includeGenericsAnyway);
527
			count++;
545
			count++;
528
			argumentList.add(argument);
546
			argumentList.add(argument);
529
			if (this.namePos >= length) break argumentsLoop;
547
			if (this.namePos >= length) break argumentsLoop;
(-)src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java (-30 / +30 lines)
Lines 1446-1456 Link Here
1446
	};
1446
	};
1447
1447
1448
	String expected13ProblemLog =
1448
	String expected13ProblemLog =
1449
		"----------\n" +
1449
		"----------\n" + 
1450
		"1. ERROR in X.java (at line 1)\n" +
1450
		"1. ERROR in X.java (at line 1)\n" + 
1451
		"	public class X <T1 extends String, T2 extends Y {\n" +
1451
		"	public class X <T1 extends String, T2 extends Y {\n" + 
1452
		"	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
1452
		"	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1453
		"Syntax error on token(s), misplaced construct(s)\n" +
1453
		"Syntax error on token(s), misplaced construct(s)\n" + 
1454
		"----------\n" + 
1455
		"2. ERROR in X.java (at line 1)\n" + 
1456
		"	public class X <T1 extends String, T2 extends Y {\n" + 
1457
		"	                                              ^\n" + 
1458
		"Y cannot be resolved to a type\n" + 
1454
		"----------\n";
1459
		"----------\n";
1455
	String expected14ProblemLog =
1460
	String expected14ProblemLog =
1456
		expected13ProblemLog;
1461
		expected13ProblemLog;
Lines 2011-2041 Link Here
2011
	};
2016
	};
2012
2017
2013
	String expected13ProblemLog =
2018
	String expected13ProblemLog =
2014
		"----------\n" +
2019
		"----------\n" + 
2015
		"1. ERROR in X.java (at line 2)\n" +
2020
		"1. ERROR in X.java (at line 2)\n" + 
2016
		"	public <T> X(T t){\n" +
2021
		"	public <T> X(T t){\n" + 
2017
		"	        ^\n" +
2022
		"	        ^\n" + 
2018
		"Syntax error, type parameters are only available if source level is 1.5\n" +
2023
		"Syntax error, type parameters are only available if source level is 1.5\n" + 
2019
		"----------\n" +
2024
		"----------\n" + 
2020
		"2. ERROR in X.java (at line 2)\n" +
2025
		"2. ERROR in X.java (at line 5)\n" + 
2021
		"	public <T> X(T t){\n" +
2026
		"	}\n" + 
2022
		"	             ^\n" +
2027
		"	^\n" + 
2023
		"T cannot be resolved to a type\n" +
2028
		"Syntax error on token \"}\", delete this token\n" + 
2024
		"----------\n" +
2029
		"----------\n" + 
2025
		"3. ERROR in X.java (at line 5)\n" +
2030
		"3. ERROR in X.java (at line 9)\n" + 
2026
		"	}\n" +
2031
		"	<String>super(\"SUCCESS\");\n" + 
2027
		"	^\n" +
2032
		"	 ^^^^^^\n" + 
2028
		"Syntax error on token \"}\", delete this token\n" +
2033
		"Syntax error, type parameters are only available if source level is 1.5\n" + 
2029
		"----------\n" +
2034
		"----------\n" + 
2030
		"4. ERROR in X.java (at line 9)\n" +
2035
		"4. ERROR in X.java (at line 9)\n" + 
2031
		"	<String>super(\"SUCCESS\");\n" +
2036
		"	<String>super(\"SUCCESS\");\n" + 
2032
		"	 ^^^^^^\n" +
2037
		"	 ^^^^^^\n" + 
2033
		"Syntax error, type parameters are only available if source level is 1.5\n" +
2038
		"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2034
		"----------\n" +
2035
		"5. ERROR in X.java (at line 9)\n" +
2036
		"	<String>super(\"SUCCESS\");\n" +
2037
		"	 ^^^^^^\n" +
2038
		"Syntax error, parameterized types are only available if source level is 1.5\n" +
2039
		"----------\n";
2039
		"----------\n";
2040
	String expected14ProblemLog =
2040
	String expected14ProblemLog =
2041
		expected13ProblemLog;
2041
		expected13ProblemLog;
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java (-801 / +436 lines)
Lines 1287-1313 Link Here
1287
					"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" +
1287
					"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" +
1288
					"}"
1288
					"}"
1289
			},
1289
			},
1290
			"----------\n" +
1290
			"----------\n" + 
1291
				"1. ERROR in X.java (at line 4)\n" +
1291
			"1. ERROR in X.java (at line 4)\n" + 
1292
				"	* @param <T> Type parameter 2\n" +
1292
			"	* @param <T> Type parameter 2\n" + 
1293
				"	         ^^^\n" +
1293
			"	         ^^^\n" + 
1294
				"Javadoc: Invalid param tag name\n" +
1294
			"Javadoc: Invalid param tag name\n" + 
1295
				"----------\n" +
1295
			"----------\n" + 
1296
				"2. ERROR in X.java (at line 5)\n" +
1296
			"2. ERROR in X.java (at line 5)\n" + 
1297
				"	* @param <V> Type parameter 2\n" +
1297
			"	* @param <V> Type parameter 2\n" + 
1298
				"	         ^^^\n" +
1298
			"	         ^^^\n" + 
1299
				"Javadoc: Invalid param tag name\n" +
1299
			"Javadoc: Invalid param tag name\n" + 
1300
				"----------\n" +
1300
			"----------\n" + 
1301
				"3. ERROR in X.java (at line 6)\n" +
1301
			"3. ERROR in X.java (at line 6)\n" + 
1302
				"	* @param <U> Type parameter 1\n" +
1302
			"	* @param <U> Type parameter 1\n" + 
1303
				"	         ^^^\n" +
1303
			"	         ^^^\n" + 
1304
				"Javadoc: Invalid param tag name\n" +
1304
			"Javadoc: Invalid param tag name\n" + 
1305
				"----------\n" +
1305
			"----------\n" + 
1306
				"4. ERROR in X.java (at line 10)\n" +
1306
			"4. ERROR in X.java (at line 10)\n" + 
1307
				"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" +
1307
			"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" + 
1308
				"	        ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
1308
			"	        ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1309
				"Syntax error, type parameters are only available if source level is 1.5\n" +
1309
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1310
				"----------\n"
1310
			"----------\n" + 
1311
			"5. ERROR in X.java (at line 10)\n" + 
1312
			"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" + 
1313
			"	                        ^^^^^^^^^^\n" + 
1314
			"Exceptions cannot be resolved to a type\n" + 
1315
			"----------\n"
1311
		);
1316
		);
1312
	}
1317
	}
1313
	public void test038() {
1318
	public void test038() {
Lines 1437-1472 Link Here
1437
				"	G(E e) {}\n" +
1442
				"	G(E e) {}\n" +
1438
				"}\n"
1443
				"}\n"
1439
			},
1444
			},
1440
			"----------\n" +
1445
			"----------\n" + 
1441
			"1. ERROR in X.java (at line 2)\n" +
1446
			"1. ERROR in X.java (at line 2)\n" + 
1442
			"	* @see G#G(Object)\n" +
1447
			"	* @see G#G(Object)\n" + 
1443
			"	         ^^^^^^^^^\n" +
1448
			"	         ^^^^^^^^^\n" + 
1444
			"Javadoc: The constructor G(Object) is undefined\n" +
1449
			"Javadoc: The constructor G(Object) is undefined\n" + 
1445
			"----------\n" +
1450
			"----------\n" + 
1446
			"2. ERROR in X.java (at line 3)\n" +
1451
			"2. ERROR in X.java (at line 5)\n" + 
1447
			"	* @see G#G(Exception)\n" +
1452
			"	public class X extends G<Exception> {\n" + 
1448
			"	         ^^^^^^^^^^^^\n" +
1453
			"	                         ^^^^^^^^^\n" + 
1449
			"Javadoc: The constructor G(Exception) is undefined\n" +
1454
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1450
			"----------\n" +
1455
			"----------\n" + 
1451
			"3. ERROR in X.java (at line 5)\n" +
1456
			"3. ERROR in X.java (at line 8)\n" + 
1452
			"	public class X extends G<Exception> {\n" +
1457
			"	class G<E extends Exception> {\n" + 
1453
			"	                         ^^^^^^^^^\n" +
1458
			"	        ^^^^^^^^^^^^^^^^^^^\n" + 
1454
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1459
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1455
			"----------\n" +
1456
			"4. ERROR in X.java (at line 6)\n" +
1457
			"	X(Exception exc) { super(exc);}\n" +
1458
			"	                   ^^^^^^^^^^^\n" +
1459
			"The constructor G(E) refers to the missing type E\n" +
1460
			"----------\n" +
1461
			"5. ERROR in X.java (at line 8)\n" +
1462
			"	class G<E extends Exception> {\n" +
1463
			"	        ^^^^^^^^^^^^^^^^^^^\n" +
1464
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1465
			"----------\n" +
1466
			"6. ERROR in X.java (at line 9)\n" +
1467
			"	G(E e) {}\n" +
1468
			"	  ^\n" +
1469
			"E cannot be resolved to a type\n" +
1470
			"----------\n"
1460
			"----------\n"
1471
		);
1461
		);
1472
	}
1462
	}
Lines 1497-1527 Link Here
1497
				"    public void testCompareTo() {}\n" +
1487
				"    public void testCompareTo() {}\n" +
1498
				"}"
1488
				"}"
1499
			},
1489
			},
1500
			"----------\n" +
1490
			"----------\n" + 
1501
			"1. ERROR in X.java (at line 2)\n" +
1491
			"1. ERROR in X.java (at line 2)\n" + 
1502
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" +
1492
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" + 
1503
			"	               ^^^^^^^^^^^^^^^^^^^^\n" +
1493
			"	               ^^^^^^^^^^^^^^^^^^^^\n" + 
1504
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1494
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1505
			"----------\n" +
1495
			"----------\n" + 
1506
			"2. ERROR in X.java (at line 2)\n" +
1496
			"2. ERROR in X.java (at line 2)\n" + 
1507
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" +
1497
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" + 
1508
			"	                                                                                                                         ^\n" +
1498
			"	                                                                                                                         ^\n" + 
1509
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1499
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1510
			"----------\n" +
1500
			"----------\n" + 
1511
			"3. ERROR in X.java (at line 2)\n" +
1501
			"3. ERROR in X.java (at line 6)\n" + 
1512
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" +
1502
			"	public static <X extends Comparable< ? super X>> int compareTo(final X first, final X firstPrime)\n" + 
1513
			"	                                                                                                                         ^\n" +
1503
			"	               ^^^^^^^^^^^^^^^^^^^^\n" + 
1514
			"T cannot be resolved to a type\n" +
1504
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1515
			"----------\n" +
1505
			"----------\n" + 
1516
			"4. ERROR in X.java (at line 6)\n" +
1506
			"4. WARNING in X.java (at line 6)\n" + 
1517
			"	public static <X extends Comparable< ? super X>> int compareTo(final X first, final X firstPrime)\n" +
1507
			"	public static <X extends Comparable< ? super X>> int compareTo(final X first, final X firstPrime)\n" + 
1518
			"	               ^^^^^^^^^^^^^^^^^^^^\n" +
1508
			"	               ^\n" + 
1519
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1509
			"The type parameter X is hiding the type X\n" + 
1520
			"----------\n" +
1510
			"----------\n" + 
1521
			"5. ERROR in X.java (at line 14)\n" +
1511
			"5. ERROR in X.java (at line 14)\n" + 
1522
			"	*  {@link ComparableUtils#compareTo(Object, Object)}.\n" +
1512
			"	*  {@link ComparableUtils#compareTo(Object, Object)}.\n" + 
1523
			"	                          ^^^^^^^^^\n" +
1513
			"	                          ^^^^^^^^^\n" + 
1524
			"Javadoc: The method compareTo(Object, Object, Class) in the type ComparableUtils is not applicable for the arguments (Object, Object)\n" +
1514
			"Javadoc: Bound mismatch: The generic method compareTo(X, X) of type ComparableUtils is not applicable for the arguments (Object, Object). The inferred type Object is not a valid substitute for the bounded parameter <X extends Comparable<? super X>>\n" + 
1525
			"----------\n");
1515
			"----------\n");
1526
	}
1516
	}
1527
1517
Lines 1560-1630 Link Here
1560
				"    }\n" +
1550
				"    }\n" +
1561
				"}\n"
1551
				"}\n"
1562
			},
1552
			},
1563
			"----------\n" +
1553
			"----------\n" + 
1564
			"1. ERROR in Test.java (at line 2)\n" +
1554
			"1. ERROR in Test.java (at line 2)\n" + 
1565
			"	* @see Test#add(T) \n" +
1555
			"	* @see Test#add(T) \n" + 
1566
			"	                ^\n" +
1556
			"	            ^^^\n" + 
1567
			"Javadoc: T cannot be resolved to a type\n" +
1557
			"Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + 
1568
			"----------\n" +
1558
			"----------\n" + 
1569
			"2. ERROR in Test.java (at line 3)\n" +
1559
			"2. ERROR in Test.java (at line 3)\n" + 
1570
			"	* @see #add(T)\n" +
1560
			"	* @see #add(T)\n" + 
1571
			"	            ^\n" +
1561
			"	        ^^^\n" + 
1572
			"Javadoc: T cannot be resolved to a type\n" +
1562
			"Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + 
1573
			"----------\n" +
1563
			"----------\n" + 
1574
			"3. ERROR in Test.java (at line 4)\n" +
1564
			"3. ERROR in Test.java (at line 4)\n" + 
1575
			"	* @see Test#Test(T)\n" +
1565
			"	* @see Test#Test(T)\n" + 
1576
			"	                 ^\n" +
1566
			"	            ^^^^^^^\n" + 
1577
			"Javadoc: T cannot be resolved to a type\n" +
1567
			"Javadoc: The constructor Test(T) is undefined\n" + 
1578
			"----------\n" +
1568
			"----------\n" + 
1579
			"4. ERROR in Test.java (at line 5)\n" +
1569
			"4. ERROR in Test.java (at line 5)\n" + 
1580
			"	* @see #Test(T)\n" +
1570
			"	* @see #Test(T)\n" + 
1581
			"	             ^\n" +
1571
			"	        ^^^^^^^\n" + 
1582
			"Javadoc: T cannot be resolved to a type\n" +
1572
			"Javadoc: The constructor Test(T) is undefined\n" + 
1583
			"----------\n" +
1573
			"----------\n" + 
1584
			"5. ERROR in Test.java (at line 11)\n" +
1574
			"5. ERROR in Test.java (at line 11)\n" + 
1585
			"	public class Test<T> {\n" +
1575
			"	public class Test<T> {\n" + 
1586
			"	                  ^\n" +
1576
			"	                  ^\n" + 
1587
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1577
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1588
			"----------\n" +
1578
			"----------\n" + 
1589
			"6. ERROR in Test.java (at line 12)\n" +
1579
			"6. ERROR in Test.java (at line 18)\n" + 
1590
			"	Test(T t) {}\n" +
1580
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1591
			"	     ^\n" +
1581
			"	          ^^^^^^^^^^^^^^^^\n" + 
1592
			"T cannot be resolved to a type\n" +
1582
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1593
			"----------\n" +
1583
			"----------\n" + 
1594
			"7. ERROR in Test.java (at line 13)\n" +
1584
			"7. ERROR in Test.java (at line 18)\n" + 
1595
			"	public boolean add(T t) {\n" +
1585
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1596
			"	                   ^\n" +
1586
			"	                                         ^\n" + 
1597
			"T cannot be resolved to a type\n" +
1587
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1598
			"----------\n" +
1599
			"8. ERROR in Test.java (at line 18)\n" +
1600
			"	class Sub<E extends Number> extends Test<E> {\n" +
1601
			"	          ^^^^^^^^^^^^^^^^\n" +
1602
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1603
			"----------\n" +
1604
			"9. ERROR in Test.java (at line 18)\n" +
1605
			"	class Sub<E extends Number> extends Test<E> {\n" +
1606
			"	                                         ^\n" +
1607
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1608
			"----------\n" +
1609
			"10. ERROR in Test.java (at line 18)\n" +
1610
			"	class Sub<E extends Number> extends Test<E> {\n" +
1611
			"	                                         ^\n" +
1612
			"E cannot be resolved to a type\n" +
1613
			"----------\n" +
1614
			"11. ERROR in Test.java (at line 19)\n" +
1615
			"	Sub (E e) {super(null);}\n" +
1616
			"	     ^\n" +
1617
			"E cannot be resolved to a type\n" +
1618
			"----------\n" +
1619
			"12. ERROR in Test.java (at line 19)\n" +
1620
			"	Sub (E e) {super(null);}\n" +
1621
			"	           ^^^^^^^^^^^^\n" +
1622
			"The constructor Test(T) refers to the missing type T\n" +
1623
			"----------\n" +
1624
			"13. ERROR in Test.java (at line 20)\n" +
1625
			"	public boolean add(E e) {\n" +
1626
			"	                   ^\n" +
1627
			"E cannot be resolved to a type\n" +
1628
			"----------\n");
1588
			"----------\n");
1629
	}
1589
	}
1630
	public void testBug83127b() {
1590
	public void testBug83127b() {
Lines 1658-1718 Link Here
1658
				"    }\n" +
1618
				"    }\n" +
1659
				"}\n"
1619
				"}\n"
1660
			},
1620
			},
1661
			"----------\n" +
1621
			"----------\n" + 
1662
			"1. ERROR in Test.java (at line 2)\n" +
1622
			"1. ERROR in Test.java (at line 2)\n" + 
1663
			"	* @see Sub#add(T)\n" +
1623
			"	* @see Sub#add(T)\n" + 
1664
			"	               ^\n" +
1624
			"	           ^^^\n" + 
1665
			"Javadoc: T cannot be resolved to a type\n" +
1625
			"Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + 
1666
			"----------\n" +
1626
			"----------\n" + 
1667
			"2. ERROR in Test.java (at line 3)\n" +
1627
			"2. ERROR in Test.java (at line 3)\n" + 
1668
			"	* @see Sub#Sub(T)\n" +
1628
			"	* @see Sub#Sub(T)\n" + 
1669
			"	               ^\n" +
1629
			"	           ^^^^^^\n" + 
1670
			"Javadoc: T cannot be resolved to a type\n" +
1630
			"Javadoc: The constructor Sub(T) is undefined\n" + 
1671
			"----------\n" +
1631
			"----------\n" + 
1672
			"3. ERROR in Test.java (at line 11)\n" +
1632
			"3. ERROR in Test.java (at line 11)\n" + 
1673
			"	public class Test<T>{\n" +
1633
			"	public class Test<T>{\n" + 
1674
			"	                  ^\n" +
1634
			"	                  ^\n" + 
1675
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1635
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1676
			"----------\n" +
1636
			"----------\n" + 
1677
			"4. ERROR in Test.java (at line 12)\n" +
1637
			"4. ERROR in Test.java (at line 18)\n" + 
1678
			"	Test(T t) {}\n" +
1638
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1679
			"	     ^\n" +
1639
			"	          ^^^^^^^^^^^^^^^^\n" + 
1680
			"T cannot be resolved to a type\n" +
1640
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1681
			"----------\n" +
1641
			"----------\n" + 
1682
			"5. ERROR in Test.java (at line 13)\n" +
1642
			"5. ERROR in Test.java (at line 18)\n" + 
1683
			"	public boolean add(T t) {\n" +
1643
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1684
			"	                   ^\n" +
1644
			"	                                         ^\n" + 
1685
			"T cannot be resolved to a type\n" +
1645
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1686
			"----------\n" +
1687
			"6. ERROR in Test.java (at line 18)\n" +
1688
			"	class Sub<E extends Number> extends Test<E> {\n" +
1689
			"	          ^^^^^^^^^^^^^^^^\n" +
1690
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1691
			"----------\n" +
1692
			"7. ERROR in Test.java (at line 18)\n" +
1693
			"	class Sub<E extends Number> extends Test<E> {\n" +
1694
			"	                                         ^\n" +
1695
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1696
			"----------\n" +
1697
			"8. ERROR in Test.java (at line 18)\n" +
1698
			"	class Sub<E extends Number> extends Test<E> {\n" +
1699
			"	                                         ^\n" +
1700
			"E cannot be resolved to a type\n" +
1701
			"----------\n" +
1702
			"9. ERROR in Test.java (at line 19)\n" +
1703
			"	Sub (E e) {super(null);}\n" +
1704
			"	     ^\n" +
1705
			"E cannot be resolved to a type\n" +
1706
			"----------\n" +
1707
			"10. ERROR in Test.java (at line 19)\n" +
1708
			"	Sub (E e) {super(null);}\n" +
1709
			"	           ^^^^^^^^^^^^\n" +
1710
			"The constructor Test(T) refers to the missing type T\n" +
1711
			"----------\n" +
1712
			"11. ERROR in Test.java (at line 20)\n" +
1713
			"	public boolean add(E e) {\n" +
1714
			"	                   ^\n" +
1715
			"E cannot be resolved to a type\n" +
1716
			"----------\n");
1646
			"----------\n");
1717
	}
1647
	}
1718
	public void testBug83127c() {
1648
	public void testBug83127c() {
Lines 1743-1803 Link Here
1743
				"    }\n" +
1673
				"    }\n" +
1744
				"}\n"
1674
				"}\n"
1745
			},
1675
			},
1746
			"----------\n" +
1676
			"----------\n" + 
1747
			"1. ERROR in Test.java (at line 2)\n" +
1677
			"1. ERROR in Test.java (at line 2)\n" + 
1748
			"	* @see Sub#add(E) \n" +
1678
			"	* @see Sub#add(E) \n" + 
1749
			"	               ^\n" +
1679
			"	               ^\n" + 
1750
			"Javadoc: E cannot be resolved to a type\n" +
1680
			"Javadoc: E cannot be resolved to a type\n" + 
1751
			"----------\n" +
1681
			"----------\n" + 
1752
			"2. ERROR in Test.java (at line 3)\n" +
1682
			"2. ERROR in Test.java (at line 3)\n" + 
1753
			"	* @see Sub#Sub(E)\n" +
1683
			"	* @see Sub#Sub(E)\n" + 
1754
			"	               ^\n" +
1684
			"	               ^\n" + 
1755
			"Javadoc: E cannot be resolved to a type\n" +
1685
			"Javadoc: E cannot be resolved to a type\n" + 
1756
			"----------\n" +
1686
			"----------\n" + 
1757
			"3. ERROR in Test.java (at line 8)\n" +
1687
			"3. ERROR in Test.java (at line 8)\n" + 
1758
			"	public class Test<T>{\n" +
1688
			"	public class Test<T>{\n" + 
1759
			"	                  ^\n" +
1689
			"	                  ^\n" + 
1760
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1690
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1761
			"----------\n" +
1691
			"----------\n" + 
1762
			"4. ERROR in Test.java (at line 9)\n" +
1692
			"4. ERROR in Test.java (at line 15)\n" + 
1763
			"	Test(T t) {}\n" +
1693
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1764
			"	     ^\n" +
1694
			"	          ^^^^^^^^^^^^^^^^\n" + 
1765
			"T cannot be resolved to a type\n" +
1695
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1766
			"----------\n" +
1696
			"----------\n" + 
1767
			"5. ERROR in Test.java (at line 10)\n" +
1697
			"5. ERROR in Test.java (at line 15)\n" + 
1768
			"	public boolean add(T t) {\n" +
1698
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1769
			"	                   ^\n" +
1699
			"	                                         ^\n" + 
1770
			"T cannot be resolved to a type\n" +
1700
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1771
			"----------\n" +
1772
			"6. ERROR in Test.java (at line 15)\n" +
1773
			"	class Sub<E extends Number> extends Test<E> {\n" +
1774
			"	          ^^^^^^^^^^^^^^^^\n" +
1775
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1776
			"----------\n" +
1777
			"7. ERROR in Test.java (at line 15)\n" +
1778
			"	class Sub<E extends Number> extends Test<E> {\n" +
1779
			"	                                         ^\n" +
1780
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1781
			"----------\n" +
1782
			"8. ERROR in Test.java (at line 15)\n" +
1783
			"	class Sub<E extends Number> extends Test<E> {\n" +
1784
			"	                                         ^\n" +
1785
			"E cannot be resolved to a type\n" +
1786
			"----------\n" +
1787
			"9. ERROR in Test.java (at line 16)\n" +
1788
			"	Sub (E e) {super(null);}\n" +
1789
			"	     ^\n" +
1790
			"E cannot be resolved to a type\n" +
1791
			"----------\n" +
1792
			"10. ERROR in Test.java (at line 16)\n" +
1793
			"	Sub (E e) {super(null);}\n" +
1794
			"	           ^^^^^^^^^^^^\n" +
1795
			"The constructor Test(T) refers to the missing type T\n" +
1796
			"----------\n" +
1797
			"11. ERROR in Test.java (at line 17)\n" +
1798
			"	public boolean add(E e) {\n" +
1799
			"	                   ^\n" +
1800
			"E cannot be resolved to a type\n" +
1801
			"----------\n");
1701
			"----------\n");
1802
	}
1702
	}
1803
	public void testBug83127d() {
1703
	public void testBug83127d() {
Lines 1833-1909 Link Here
1833
				"    }\n" +
1733
				"    }\n" +
1834
				"}\n"
1734
				"}\n"
1835
			},
1735
			},
1836
			"----------\n" +
1736
			"----------\n" + 
1837
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1737
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
1838
			"	public class Unrelated1<E extends Number> {\n" +
1738
			"	public class Unrelated1<E extends Number> {\n" + 
1839
			"	                        ^^^^^^^^^^^^^^^^\n" +
1739
			"	                        ^^^^^^^^^^^^^^^^\n" + 
1840
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1740
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1841
			"----------\n" +
1741
			"----------\n" + 
1842
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1742
			"----------\n" + 
1843
			"	public Unrelated1(E e) {}\n" +
1743
			"1. ERROR in Test.java (at line 2)\n" + 
1844
			"	                  ^\n" +
1744
			"	* @see Unrelated1#add(E)\n" + 
1845
			"E cannot be resolved to a type\n" +
1745
			"	                      ^\n" + 
1846
			"----------\n" +
1746
			"Javadoc: E cannot be resolved to a type\n" + 
1847
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1747
			"----------\n" + 
1848
			"	public boolean add(E e) { return false; }\n" +
1748
			"2. ERROR in Test.java (at line 3)\n" + 
1849
			"	                   ^\n" +
1749
			"	* @see Unrelated1#Unrelated1(E)\n" + 
1850
			"E cannot be resolved to a type\n" +
1750
			"	                             ^\n" + 
1851
			"----------\n" +
1751
			"Javadoc: E cannot be resolved to a type\n" + 
1852
			"----------\n" +
1752
			"----------\n" + 
1853
			"1. ERROR in Test.java (at line 2)\n" +
1753
			"3. ERROR in Test.java (at line 8)\n" + 
1854
			"	* @see Unrelated1#add(E)\n" +
1754
			"	public class Test<T>{\n" + 
1855
			"	                      ^\n" +
1755
			"	                  ^\n" + 
1856
			"Javadoc: E cannot be resolved to a type\n" +
1756
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1857
			"----------\n" +
1757
			"----------\n" + 
1858
			"2. ERROR in Test.java (at line 3)\n" +
1758
			"4. ERROR in Test.java (at line 15)\n" + 
1859
			"	* @see Unrelated1#Unrelated1(E)\n" +
1759
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1860
			"	                             ^\n" +
1760
			"	          ^^^^^^^^^^^^^^^^\n" + 
1861
			"Javadoc: E cannot be resolved to a type\n" +
1761
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1862
			"----------\n" +
1762
			"----------\n" + 
1863
			"3. ERROR in Test.java (at line 8)\n" +
1763
			"5. ERROR in Test.java (at line 15)\n" + 
1864
			"	public class Test<T>{\n" +
1764
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1865
			"	                  ^\n" +
1765
			"	                                         ^\n" + 
1866
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1766
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1867
			"----------\n" +
1868
			"4. ERROR in Test.java (at line 9)\n" +
1869
			"	Test(T t) {}\n" +
1870
			"	     ^\n" +
1871
			"T cannot be resolved to a type\n" +
1872
			"----------\n" +
1873
			"5. ERROR in Test.java (at line 10)\n" +
1874
			"	public boolean add(T t) {\n" +
1875
			"	                   ^\n" +
1876
			"T cannot be resolved to a type\n" +
1877
			"----------\n" +
1878
			"6. ERROR in Test.java (at line 15)\n" +
1879
			"	class Sub<E extends Number> extends Test<E> {\n" +
1880
			"	          ^^^^^^^^^^^^^^^^\n" +
1881
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1882
			"----------\n" +
1883
			"7. ERROR in Test.java (at line 15)\n" +
1884
			"	class Sub<E extends Number> extends Test<E> {\n" +
1885
			"	                                         ^\n" +
1886
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1887
			"----------\n" +
1888
			"8. ERROR in Test.java (at line 15)\n" +
1889
			"	class Sub<E extends Number> extends Test<E> {\n" +
1890
			"	                                         ^\n" +
1891
			"E cannot be resolved to a type\n" +
1892
			"----------\n" +
1893
			"9. ERROR in Test.java (at line 16)\n" +
1894
			"	Sub (E e) {super(null);}\n" +
1895
			"	     ^\n" +
1896
			"E cannot be resolved to a type\n" +
1897
			"----------\n" +
1898
			"10. ERROR in Test.java (at line 16)\n" +
1899
			"	Sub (E e) {super(null);}\n" +
1900
			"	           ^^^^^^^^^^^^\n" +
1901
			"The constructor Test(T) refers to the missing type T\n" +
1902
			"----------\n" +
1903
			"11. ERROR in Test.java (at line 17)\n" +
1904
			"	public boolean add(E e) {\n" +
1905
			"	                   ^\n" +
1906
			"E cannot be resolved to a type\n" +
1907
			"----------\n");
1767
			"----------\n");
1908
	}
1768
	}
1909
	public void testBug83127e() {
1769
	public void testBug83127e() {
Lines 1939-2015 Link Here
1939
				"    }\n" +
1799
				"    }\n" +
1940
				"}\n"
1800
				"}\n"
1941
			},
1801
			},
1942
			"----------\n" +
1802
			"----------\n" + 
1943
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1803
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
1944
			"	public class Unrelated1<E extends Number> {\n" +
1804
			"	public class Unrelated1<E extends Number> {\n" + 
1945
			"	                        ^^^^^^^^^^^^^^^^\n" +
1805
			"	                        ^^^^^^^^^^^^^^^^\n" + 
1946
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1806
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1947
			"----------\n" +
1807
			"----------\n" + 
1948
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1808
			"----------\n" + 
1949
			"	public Unrelated1(E e) {}\n" +
1809
			"1. ERROR in Test.java (at line 2)\n" + 
1950
			"	                  ^\n" +
1810
			"	* @see Unrelated1#add(Object)\n" + 
1951
			"E cannot be resolved to a type\n" +
1811
			"	                  ^^^\n" + 
1952
			"----------\n" +
1812
			"Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Object)\n" + 
1953
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1813
			"----------\n" + 
1954
			"	public boolean add(E e) { return false; }\n" +
1814
			"2. ERROR in Test.java (at line 3)\n" + 
1955
			"	                   ^\n" +
1815
			"	* @see Unrelated1#Unrelated1(Object)\n" + 
1956
			"E cannot be resolved to a type\n" +
1816
			"	                  ^^^^^^^^^^^^^^^^^^\n" + 
1957
			"----------\n" +
1817
			"Javadoc: The constructor Unrelated1(Object) is undefined\n" + 
1958
			"----------\n" +
1818
			"----------\n" + 
1959
			"1. ERROR in Test.java (at line 2)\n" +
1819
			"3. ERROR in Test.java (at line 9)\n" + 
1960
			"	* @see Unrelated1#add(Object)\n" +
1820
			"	public class Test<T>{\n" + 
1961
			"	                  ^^^\n" +
1821
			"	                  ^\n" + 
1962
			"Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Object)\n" +
1822
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1963
			"----------\n" +
1823
			"----------\n" + 
1964
			"2. ERROR in Test.java (at line 3)\n" +
1824
			"4. ERROR in Test.java (at line 15)\n" + 
1965
			"	* @see Unrelated1#Unrelated1(Object)\n" +
1825
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1966
			"	                  ^^^^^^^^^^^^^^^^^^\n" +
1826
			"	          ^^^^^^^^^^^^^^^^\n" + 
1967
			"Javadoc: The constructor Unrelated1(Object) is undefined\n" +
1827
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1968
			"----------\n" +
1828
			"----------\n" + 
1969
			"3. ERROR in Test.java (at line 9)\n" +
1829
			"5. ERROR in Test.java (at line 15)\n" + 
1970
			"	public class Test<T>{\n" +
1830
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1971
			"	                  ^\n" +
1831
			"	                                         ^\n" + 
1972
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1832
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1973
			"----------\n" +
1974
			"4. ERROR in Test.java (at line 10)\n" +
1975
			"	Test(T t) {}\n" +
1976
			"	     ^\n" +
1977
			"T cannot be resolved to a type\n" +
1978
			"----------\n" +
1979
			"5. ERROR in Test.java (at line 11)\n" +
1980
			"	public boolean add(T t) {\n" +
1981
			"	                   ^\n" +
1982
			"T cannot be resolved to a type\n" +
1983
			"----------\n" +
1984
			"6. ERROR in Test.java (at line 15)\n" +
1985
			"	class Sub<E extends Number> extends Test<E> {\n" +
1986
			"	          ^^^^^^^^^^^^^^^^\n" +
1987
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1988
			"----------\n" +
1989
			"7. ERROR in Test.java (at line 15)\n" +
1990
			"	class Sub<E extends Number> extends Test<E> {\n" +
1991
			"	                                         ^\n" +
1992
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1993
			"----------\n" +
1994
			"8. ERROR in Test.java (at line 15)\n" +
1995
			"	class Sub<E extends Number> extends Test<E> {\n" +
1996
			"	                                         ^\n" +
1997
			"E cannot be resolved to a type\n" +
1998
			"----------\n" +
1999
			"9. ERROR in Test.java (at line 16)\n" +
2000
			"	Sub (E e) {super(null);}\n" +
2001
			"	     ^\n" +
2002
			"E cannot be resolved to a type\n" +
2003
			"----------\n" +
2004
			"10. ERROR in Test.java (at line 16)\n" +
2005
			"	Sub (E e) {super(null);}\n" +
2006
			"	           ^^^^^^^^^^^^\n" +
2007
			"The constructor Test(T) refers to the missing type T\n" +
2008
			"----------\n" +
2009
			"11. ERROR in Test.java (at line 17)\n" +
2010
			"	public boolean add(E e) {\n" +
2011
			"	                   ^\n" +
2012
			"E cannot be resolved to a type\n" +
2013
			"----------\n");
1833
			"----------\n");
2014
	}
1834
	}
2015
	public void testBug83127f() {
1835
	public void testBug83127f() {
Lines 2044-2120 Link Here
2044
				"    }\n" +
1864
				"    }\n" +
2045
				"}\n"
1865
				"}\n"
2046
			},
1866
			},
2047
			"----------\n" +
1867
			"----------\n" + 
2048
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1868
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
2049
			"	public class Unrelated1<E extends Number> {\n" +
1869
			"	public class Unrelated1<E extends Number> {\n" + 
2050
			"	                        ^^^^^^^^^^^^^^^^\n" +
1870
			"	                        ^^^^^^^^^^^^^^^^\n" + 
2051
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1871
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2052
			"----------\n" +
1872
			"----------\n" + 
2053
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1873
			"----------\n" + 
2054
			"	public Unrelated1(E e) {}\n" +
1874
			"1. ERROR in Test.java (at line 8)\n" + 
2055
			"	                  ^\n" +
1875
			"	public class Test<T>{\n" + 
2056
			"E cannot be resolved to a type\n" +
1876
			"	                  ^\n" + 
2057
			"----------\n" +
1877
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2058
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1878
			"----------\n" + 
2059
			"	public boolean add(E e) { return false; }\n" +
1879
			"2. ERROR in Test.java (at line 14)\n" + 
2060
			"	                   ^\n" +
1880
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2061
			"E cannot be resolved to a type\n" +
1881
			"	          ^^^^^^^^^^^^^^^^\n" + 
2062
			"----------\n" +
1882
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2063
			"----------\n" +
1883
			"----------\n" + 
2064
			"1. ERROR in Test.java (at line 2)\n" +
1884
			"3. ERROR in Test.java (at line 14)\n" + 
2065
			"	* @see Unrelated1#add(Number)\n" +
1885
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2066
			"	                  ^^^\n" +
1886
			"	                                         ^\n" + 
2067
			"Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Number)\n" +
1887
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2068
			"----------\n" +
2069
			"2. ERROR in Test.java (at line 3)\n" +
2070
			"	* @see Unrelated1#Unrelated1(Number)\n" +
2071
			"	                  ^^^^^^^^^^^^^^^^^^\n" +
2072
			"Javadoc: The constructor Unrelated1(Number) is undefined\n" +
2073
			"----------\n" +
2074
			"3. ERROR in Test.java (at line 8)\n" +
2075
			"	public class Test<T>{\n" +
2076
			"	                  ^\n" +
2077
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2078
			"----------\n" +
2079
			"4. ERROR in Test.java (at line 9)\n" +
2080
			"	Test(T t) {}\n" +
2081
			"	     ^\n" +
2082
			"T cannot be resolved to a type\n" +
2083
			"----------\n" +
2084
			"5. ERROR in Test.java (at line 10)\n" +
2085
			"	public boolean add(T t) {\n" +
2086
			"	                   ^\n" +
2087
			"T cannot be resolved to a type\n" +
2088
			"----------\n" +
2089
			"6. ERROR in Test.java (at line 14)\n" +
2090
			"	class Sub<E extends Number> extends Test<E> {\n" +
2091
			"	          ^^^^^^^^^^^^^^^^\n" +
2092
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2093
			"----------\n" +
2094
			"7. ERROR in Test.java (at line 14)\n" +
2095
			"	class Sub<E extends Number> extends Test<E> {\n" +
2096
			"	                                         ^\n" +
2097
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2098
			"----------\n" +
2099
			"8. ERROR in Test.java (at line 14)\n" +
2100
			"	class Sub<E extends Number> extends Test<E> {\n" +
2101
			"	                                         ^\n" +
2102
			"E cannot be resolved to a type\n" +
2103
			"----------\n" +
2104
			"9. ERROR in Test.java (at line 15)\n" +
2105
			"	Sub (E e) {super(null);}\n" +
2106
			"	     ^\n" +
2107
			"E cannot be resolved to a type\n" +
2108
			"----------\n" +
2109
			"10. ERROR in Test.java (at line 15)\n" +
2110
			"	Sub (E e) {super(null);}\n" +
2111
			"	           ^^^^^^^^^^^^\n" +
2112
			"The constructor Test(T) refers to the missing type T\n" +
2113
			"----------\n" +
2114
			"11. ERROR in Test.java (at line 16)\n" +
2115
			"	public boolean add(E e) {\n" +
2116
			"	                   ^\n" +
2117
			"E cannot be resolved to a type\n" +
2118
			"----------\n"
1888
			"----------\n"
2119
		);
1889
		);
2120
	}
1890
	}
Lines 2152-2228 Link Here
2152
				"    }\n" +
1922
				"    }\n" +
2153
				"}\n"
1923
				"}\n"
2154
			},
1924
			},
2155
			"----------\n" +
1925
			"----------\n" + 
2156
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1926
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
2157
			"	public class Unrelated1<E extends Number> {\n" +
1927
			"	public class Unrelated1<E extends Number> {\n" + 
2158
			"	                        ^^^^^^^^^^^^^^^^\n" +
1928
			"	                        ^^^^^^^^^^^^^^^^\n" + 
2159
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1929
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2160
			"----------\n" +
1930
			"----------\n" + 
2161
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1931
			"----------\n" + 
2162
			"	public Unrelated1(E e) {}\n" +
1932
			"1. ERROR in Test.java (at line 2)\n" + 
2163
			"	                  ^\n" +
1933
			"	* @see Unrelated1#add(Integer)\n" + 
2164
			"E cannot be resolved to a type\n" +
1934
			"	                  ^^^\n" + 
2165
			"----------\n" +
1935
			"Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Integer)\n" + 
2166
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1936
			"----------\n" + 
2167
			"	public boolean add(E e) { return false; }\n" +
1937
			"2. ERROR in Test.java (at line 3)\n" + 
2168
			"	                   ^\n" +
1938
			"	* @see Unrelated1#Unrelated1(Integer)\n" + 
2169
			"E cannot be resolved to a type\n" +
1939
			"	                  ^^^^^^^^^^^^^^^^^^^\n" + 
2170
			"----------\n" +
1940
			"Javadoc: The constructor Unrelated1(Integer) is undefined\n" + 
2171
			"----------\n" +
1941
			"----------\n" + 
2172
			"1. ERROR in Test.java (at line 2)\n" +
1942
			"3. ERROR in Test.java (at line 9)\n" + 
2173
			"	* @see Unrelated1#add(Integer)\n" +
1943
			"	public class Test<T>{\n" + 
2174
			"	                  ^^^\n" +
1944
			"	                  ^\n" + 
2175
			"Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Integer)\n" +
1945
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2176
			"----------\n" +
1946
			"----------\n" + 
2177
			"2. ERROR in Test.java (at line 3)\n" +
1947
			"4. ERROR in Test.java (at line 16)\n" + 
2178
			"	* @see Unrelated1#Unrelated1(Integer)\n" +
1948
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2179
			"	                  ^^^^^^^^^^^^^^^^^^^\n" +
1949
			"	          ^^^^^^^^^^^^^^^^\n" + 
2180
			"Javadoc: The constructor Unrelated1(Integer) is undefined\n" +
1950
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2181
			"----------\n" +
1951
			"----------\n" + 
2182
			"3. ERROR in Test.java (at line 9)\n" +
1952
			"5. ERROR in Test.java (at line 16)\n" + 
2183
			"	public class Test<T>{\n" +
1953
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2184
			"	                  ^\n" +
1954
			"	                                         ^\n" + 
2185
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1955
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2186
			"----------\n" +
2187
			"4. ERROR in Test.java (at line 10)\n" +
2188
			"	Test(T t) {}\n" +
2189
			"	     ^\n" +
2190
			"T cannot be resolved to a type\n" +
2191
			"----------\n" +
2192
			"5. ERROR in Test.java (at line 11)\n" +
2193
			"	public boolean add(T t) {\n" +
2194
			"	                   ^\n" +
2195
			"T cannot be resolved to a type\n" +
2196
			"----------\n" +
2197
			"6. ERROR in Test.java (at line 16)\n" +
2198
			"	class Sub<E extends Number> extends Test<E> {\n" +
2199
			"	          ^^^^^^^^^^^^^^^^\n" +
2200
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2201
			"----------\n" +
2202
			"7. ERROR in Test.java (at line 16)\n" +
2203
			"	class Sub<E extends Number> extends Test<E> {\n" +
2204
			"	                                         ^\n" +
2205
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2206
			"----------\n" +
2207
			"8. ERROR in Test.java (at line 16)\n" +
2208
			"	class Sub<E extends Number> extends Test<E> {\n" +
2209
			"	                                         ^\n" +
2210
			"E cannot be resolved to a type\n" +
2211
			"----------\n" +
2212
			"9. ERROR in Test.java (at line 17)\n" +
2213
			"	Sub (E e) {super(null);}\n" +
2214
			"	     ^\n" +
2215
			"E cannot be resolved to a type\n" +
2216
			"----------\n" +
2217
			"10. ERROR in Test.java (at line 17)\n" +
2218
			"	Sub (E e) {super(null);}\n" +
2219
			"	           ^^^^^^^^^^^^\n" +
2220
			"The constructor Test(T) refers to the missing type T\n" +
2221
			"----------\n" +
2222
			"11. ERROR in Test.java (at line 18)\n" +
2223
			"	public boolean add(E e) {\n" +
2224
			"	                   ^\n" +
2225
			"E cannot be resolved to a type\n" +
2226
			"----------\n"
1956
			"----------\n"
2227
		);
1957
		);
2228
	}
1958
	}
Lines 2260-2326 Link Here
2260
				"    }\n" +
1990
				"    }\n" +
2261
				"}\n"
1991
				"}\n"
2262
			},
1992
			},
2263
			"----------\n" +
1993
			"----------\n" + 
2264
			"1. ERROR in Unrelated2.java (at line 1)\n" +
1994
			"1. ERROR in Unrelated2.java (at line 1)\n" + 
2265
			"	public interface Unrelated2<E> {\n" +
1995
			"	public interface Unrelated2<E> {\n" + 
2266
			"	                            ^\n" +
1996
			"	                            ^\n" + 
2267
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1997
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2268
			"----------\n" +
1998
			"----------\n" + 
2269
			"2. ERROR in Unrelated2.java (at line 2)\n" +
1999
			"----------\n" + 
2270
			"	boolean add(E e);\n" +
2000
			"1. ERROR in Test.java (at line 2)\n" + 
2271
			"	            ^\n" +
2001
			"	* @see Unrelated2#add(T)\n" + 
2272
			"E cannot be resolved to a type\n" +
2002
			"	                  ^^^\n" + 
2273
			"----------\n" +
2003
			"Javadoc: The method add(Object) in the type Unrelated2 is not applicable for the arguments (T)\n" + 
2274
			"----------\n" +
2004
			"----------\n" + 
2275
			"1. ERROR in Test.java (at line 2)\n" +
2005
			"2. ERROR in Test.java (at line 10)\n" + 
2276
			"	* @see Unrelated2#add(T)\n" +
2006
			"	public class Test<T>{\n" + 
2277
			"	                      ^\n" +
2007
			"	                  ^\n" + 
2278
			"Javadoc: T cannot be resolved to a type\n" +
2008
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2279
			"----------\n" +
2009
			"----------\n" + 
2280
			"2. ERROR in Test.java (at line 10)\n" +
2010
			"3. ERROR in Test.java (at line 17)\n" + 
2281
			"	public class Test<T>{\n" +
2011
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2282
			"	                  ^\n" +
2012
			"	          ^^^^^^^^^^^^^^^^\n" + 
2283
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2013
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2284
			"----------\n" +
2014
			"----------\n" + 
2285
			"3. ERROR in Test.java (at line 11)\n" +
2015
			"4. ERROR in Test.java (at line 17)\n" + 
2286
			"	Test(T t) {}\n" +
2016
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2287
			"	     ^\n" +
2017
			"	                                         ^\n" + 
2288
			"T cannot be resolved to a type\n" +
2018
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2289
			"----------\n" +
2290
			"4. ERROR in Test.java (at line 12)\n" +
2291
			"	public boolean add(T t) {\n" +
2292
			"	                   ^\n" +
2293
			"T cannot be resolved to a type\n" +
2294
			"----------\n" +
2295
			"5. ERROR in Test.java (at line 17)\n" +
2296
			"	class Sub<E extends Number> extends Test<E> {\n" +
2297
			"	          ^^^^^^^^^^^^^^^^\n" +
2298
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2299
			"----------\n" +
2300
			"6. ERROR in Test.java (at line 17)\n" +
2301
			"	class Sub<E extends Number> extends Test<E> {\n" +
2302
			"	                                         ^\n" +
2303
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2304
			"----------\n" +
2305
			"7. ERROR in Test.java (at line 17)\n" +
2306
			"	class Sub<E extends Number> extends Test<E> {\n" +
2307
			"	                                         ^\n" +
2308
			"E cannot be resolved to a type\n" +
2309
			"----------\n" +
2310
			"8. ERROR in Test.java (at line 18)\n" +
2311
			"	Sub (E e) {super(null);}\n" +
2312
			"	     ^\n" +
2313
			"E cannot be resolved to a type\n" +
2314
			"----------\n" +
2315
			"9. ERROR in Test.java (at line 18)\n" +
2316
			"	Sub (E e) {super(null);}\n" +
2317
			"	           ^^^^^^^^^^^^\n" +
2318
			"The constructor Test(T) refers to the missing type T\n" +
2319
			"----------\n" +
2320
			"10. ERROR in Test.java (at line 19)\n" +
2321
			"	public boolean add(E e) {\n" +
2322
			"	                   ^\n" +
2323
			"E cannot be resolved to a type\n" +
2324
			"----------\n");
2019
			"----------\n");
2325
	}
2020
	}
2326
2021
Lines 3265-3335 Link Here
3265
				" */\n" +
2960
				" */\n" +
3266
				"class G<T> {}\n"
2961
				"class G<T> {}\n"
3267
			},
2962
			},
3268
			"----------\n" +
2963
			"----------\n" + 
3269
			"1. ERROR in test\\X.java (at line 8)\n" +
2964
			"1. ERROR in test\\X.java (at line 8)\n" + 
3270
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2965
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" + 
3271
			"	        ^\n" +
2966
			"	        ^\n" + 
3272
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2967
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3273
			"----------\n" +
2968
			"----------\n" + 
3274
			"2. ERROR in test\\X.java (at line 8)\n" +
2969
			"2. ERROR in test\\X.java (at line 8)\n" + 
3275
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2970
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" + 
3276
			"	             ^\n" +
2971
			"	             ^\n" + 
3277
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2972
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3278
			"----------\n" +
2973
			"----------\n" + 
3279
			"3. ERROR in test\\X.java (at line 8)\n" +
2974
			"3. ERROR in test\\X.java (at line 8)\n" + 
3280
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2975
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" + 
3281
			"	             ^\n" +
2976
			"	                          ^\n" + 
3282
			"T cannot be resolved to a type\n" +
2977
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3283
			"----------\n" +
2978
			"----------\n" + 
3284
			"4. ERROR in test\\X.java (at line 8)\n" +
2979
			"4. ERROR in test\\X.java (at line 15)\n" + 
3285
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2980
			"	* @param <T>\n" + 
3286
			"	                          ^\n" +
2981
			"	         ^^^\n" + 
3287
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2982
			"Javadoc: Invalid param tag name\n" + 
3288
			"----------\n" +
2983
			"----------\n" + 
3289
			"5. ERROR in test\\X.java (at line 8)\n" +
2984
			"5. ERROR in test\\X.java (at line 19)\n" + 
3290
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2985
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" + 
3291
			"	                          ^\n" +
2986
			"	        ^^^^^^^^^^^^^^^^\n" + 
3292
			"T cannot be resolved to a type\n" +
2987
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3293
			"----------\n" +
2988
			"----------\n" + 
3294
			"6. ERROR in test\\X.java (at line 15)\n" +
2989
			"6. ERROR in test\\X.java (at line 19)\n" + 
3295
			"	* @param <T>\n" +
2990
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" + 
3296
			"	         ^^^\n" +
2991
			"	                            ^\n" + 
3297
			"Javadoc: Invalid param tag name\n" +
2992
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3298
			"----------\n" +
2993
			"----------\n" + 
3299
			"7. ERROR in test\\X.java (at line 19)\n" +
2994
			"7. ERROR in test\\X.java (at line 19)\n" + 
3300
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
2995
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" + 
3301
			"	        ^^^^^^^^^^^^^^^^\n" +
2996
			"	                                         ^\n" + 
3302
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2997
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3303
			"----------\n" +
2998
			"----------\n" + 
3304
			"8. ERROR in test\\X.java (at line 19)\n" +
2999
			"8. ERROR in test\\X.java (at line 22)\n" + 
3305
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
3000
			"	* @param <T>\n" + 
3306
			"	                            ^\n" +
3001
			"	         ^^^\n" + 
3307
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3002
			"Javadoc: Invalid param tag name\n" + 
3308
			"----------\n" +
3003
			"----------\n" + 
3309
			"9. ERROR in test\\X.java (at line 19)\n" +
3004
			"9. ERROR in test\\X.java (at line 24)\n" + 
3310
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
3005
			"	class G<T> {}\n" + 
3311
			"	                            ^\n" +
3006
			"	        ^\n" + 
3312
			"T cannot be resolved to a type\n" +
3007
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3313
			"----------\n" +
3314
			"10. ERROR in test\\X.java (at line 19)\n" +
3315
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
3316
			"	                                         ^\n" +
3317
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3318
			"----------\n" +
3319
			"11. ERROR in test\\X.java (at line 19)\n" +
3320
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
3321
			"	                                         ^\n" +
3322
			"T cannot be resolved to a type\n" +
3323
			"----------\n" +
3324
			"12. ERROR in test\\X.java (at line 22)\n" +
3325
			"	* @param <T>\n" +
3326
			"	         ^^^\n" +
3327
			"Javadoc: Invalid param tag name\n" +
3328
			"----------\n" +
3329
			"13. ERROR in test\\X.java (at line 24)\n" +
3330
			"	class G<T> {}\n" +
3331
			"	        ^\n" +
3332
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3333
			"----------\n");
3008
			"----------\n");
3334
	}
3009
	}
3335
	public void testBug95521b() {
3010
	public void testBug95521b() {
Lines 3372-3467 Link Here
3372
				"    }\n" +
3047
				"    }\n" +
3373
				"}\n"
3048
				"}\n"
3374
			},
3049
			},
3375
			"----------\n" +
3050
			"----------\n" + 
3376
			"1. ERROR in test\\X.java (at line 6)\n" +
3051
			"1. ERROR in test\\X.java (at line 6)\n" + 
3377
			"	* @param <T>\n" +
3052
			"	* @param <T>\n" + 
3378
			"	         ^^^\n" +
3053
			"	         ^^^\n" + 
3379
			"Javadoc: Invalid param tag name\n" +
3054
			"Javadoc: Invalid param tag name\n" + 
3380
			"----------\n" +
3055
			"----------\n" + 
3381
			"2. ERROR in test\\X.java (at line 9)\n" +
3056
			"2. ERROR in test\\X.java (at line 9)\n" + 
3382
			"	public <T> X(Class<T> classT) {\n" +
3057
			"	public <T> X(Class<T> classT) {\n" + 
3383
			"	        ^\n" +
3058
			"	        ^\n" + 
3384
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3059
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3385
			"----------\n" +
3060
			"----------\n" + 
3386
			"3. ERROR in test\\X.java (at line 9)\n" +
3061
			"3. ERROR in test\\X.java (at line 9)\n" + 
3387
			"	public <T> X(Class<T> classT) {\n" +
3062
			"	public <T> X(Class<T> classT) {\n" + 
3388
			"	                   ^\n" +
3063
			"	                   ^\n" + 
3389
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3064
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3390
			"----------\n" +
3065
			"----------\n" + 
3391
			"4. ERROR in test\\X.java (at line 9)\n" +
3066
			"4. ERROR in test\\X.java (at line 12)\n" + 
3392
			"	public <T> X(Class<T> classT) {\n" +
3067
			"	* @param <T>\n" + 
3393
			"	                   ^\n" +
3068
			"	         ^^^\n" + 
3394
			"T cannot be resolved to a type\n" +
3069
			"Javadoc: Invalid param tag name\n" + 
3395
			"----------\n" +
3070
			"----------\n" + 
3396
			"5. ERROR in test\\X.java (at line 12)\n" +
3071
			"5. ERROR in test\\X.java (at line 16)\n" + 
3397
			"	* @param <T>\n" +
3072
			"	public <T> Class<T> foo(Class<T> classT) {\n" + 
3398
			"	         ^^^\n" +
3073
			"	        ^\n" + 
3399
			"Javadoc: Invalid param tag name\n" +
3074
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3400
			"----------\n" +
3075
			"----------\n" + 
3401
			"6. ERROR in test\\X.java (at line 16)\n" +
3076
			"6. ERROR in test\\X.java (at line 16)\n" + 
3402
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
3077
			"	public <T> Class<T> foo(Class<T> classT) {\n" + 
3403
			"	        ^\n" +
3078
			"	                 ^\n" + 
3404
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3079
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3405
			"----------\n" +
3080
			"----------\n" + 
3406
			"7. ERROR in test\\X.java (at line 16)\n" +
3081
			"7. ERROR in test\\X.java (at line 16)\n" + 
3407
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
3082
			"	public <T> Class<T> foo(Class<T> classT) {\n" + 
3408
			"	                 ^\n" +
3083
			"	                              ^\n" + 
3409
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3084
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3410
			"----------\n" +
3085
			"----------\n" + 
3411
			"8. ERROR in test\\X.java (at line 16)\n" +
3086
			"8. ERROR in test\\X.java (at line 25)\n" + 
3412
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
3087
			"	public <T> Y(Class<T> classT) {\n" + 
3413
			"	                 ^\n" +
3088
			"	        ^\n" + 
3414
			"T cannot be resolved to a type\n" +
3089
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3415
			"----------\n" +
3090
			"----------\n" + 
3416
			"9. ERROR in test\\X.java (at line 16)\n" +
3091
			"9. ERROR in test\\X.java (at line 25)\n" + 
3417
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
3092
			"	public <T> Y(Class<T> classT) {\n" + 
3418
			"	                              ^\n" +
3093
			"	                   ^\n" + 
3419
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3094
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3420
			"----------\n" +
3095
			"----------\n" + 
3421
			"10. ERROR in test\\X.java (at line 16)\n" +
3096
			"10. ERROR in test\\X.java (at line 32)\n" + 
3422
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
3097
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + 
3423
			"	                              ^\n" +
3098
			"	        ^^^^^^^^^^^^^^^^\n" + 
3424
			"T cannot be resolved to a type\n" +
3099
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3425
			"----------\n" +
3100
			"----------\n" + 
3426
			"11. ERROR in test\\X.java (at line 25)\n" +
3101
			"11. ERROR in test\\X.java (at line 32)\n" + 
3427
			"	public <T> Y(Class<T> classT) {\n" +
3102
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + 
3428
			"	        ^\n" +
3103
			"	                                ^\n" + 
3429
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3104
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3430
			"----------\n" +
3105
			"----------\n" + 
3431
			"12. ERROR in test\\X.java (at line 25)\n" +
3106
			"12. ERROR in test\\X.java (at line 32)\n" + 
3432
			"	public <T> Y(Class<T> classT) {\n" +
3107
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + 
3433
			"	                   ^\n" +
3108
			"	                                             ^\n" + 
3434
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3109
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
3435
			"----------\n" +
3436
			"13. ERROR in test\\X.java (at line 25)\n" +
3437
			"	public <T> Y(Class<T> classT) {\n" +
3438
			"	                   ^\n" +
3439
			"T cannot be resolved to a type\n" +
3440
			"----------\n" +
3441
			"14. ERROR in test\\X.java (at line 32)\n" +
3442
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
3443
			"	        ^^^^^^^^^^^^^^^^\n" +
3444
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3445
			"----------\n" +
3446
			"15. ERROR in test\\X.java (at line 32)\n" +
3447
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
3448
			"	                                ^\n" +
3449
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3450
			"----------\n" +
3451
			"16. ERROR in test\\X.java (at line 32)\n" +
3452
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
3453
			"	                                ^\n" +
3454
			"T cannot be resolved to a type\n" +
3455
			"----------\n" +
3456
			"17. ERROR in test\\X.java (at line 32)\n" +
3457
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
3458
			"	                                             ^\n" +
3459
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
3460
			"----------\n" +
3461
			"18. ERROR in test\\X.java (at line 32)\n" +
3462
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
3463
			"	                                             ^\n" +
3464
			"T cannot be resolved to a type\n" +
3465
			"----------\n");
3110
			"----------\n");
3466
	}
3111
	}
3467
3112
Lines 3522-3547 Link Here
3522
				"	}\n" +
3167
				"	}\n" +
3523
				"}\n"
3168
				"}\n"
3524
			},
3169
			},
3525
			"----------\n" +
3170
			"----------\n" + 
3526
			"1. ERROR in X.java (at line 1)\n" +
3171
			"1. ERROR in X.java (at line 1)\n" + 
3527
			"	public class X<T, F> {\n" +
3172
			"	public class X<T, F> {\n" + 
3528
			"	               ^^^^\n" +
3173
			"	               ^^^^\n" + 
3529
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3174
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3530
			"----------\n" +
3175
			"----------\n" + 
3531
			"2. ERROR in X.java (at line 4)\n" +
3176
			"2. ERROR in X.java (at line 4)\n" + 
3532
			"	* @see T Variable \n" +
3177
			"	* @see T Variable \n" + 
3533
			"	       ^\n" +
3178
			"	       ^\n" + 
3534
			"Javadoc: T cannot be resolved to a type\n" +
3179
			"Javadoc: Invalid reference\n" + 
3535
			"----------\n" +
3180
			"----------\n" + 
3536
			"3. ERROR in X.java (at line 5)\n" +
3181
			"3. ERROR in X.java (at line 5)\n" + 
3537
			"	* @see F Variable\n" +
3182
			"	* @see F Variable\n" + 
3538
			"	       ^\n" +
3183
			"	       ^\n" + 
3539
			"Javadoc: F cannot be resolved to a type\n" +
3184
			"Javadoc: Invalid reference\n" + 
3540
			"----------\n" +
3185
			"----------\n" + 
3541
			"4. ERROR in X.java (at line 7)\n" +
3186
			"4. ERROR in X.java (at line 7)\n" + 
3542
			"	static class Entry<L, R> {\n" +
3187
			"	static class Entry<L, R> {\n" + 
3543
			"	                   ^^^^\n" +
3188
			"	                   ^^^^\n" + 
3544
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3189
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3545
			"----------\n"
3190
			"----------\n"
3546
		);
3191
		);
3547
	}
3192
	}
Lines 3598-3623 Link Here
3598
				"	}\n" +
3243
				"	}\n" +
3599
				"}\n"
3244
				"}\n"
3600
			},
3245
			},
3601
			"----------\n" +
3246
			"----------\n" + 
3602
			"1. ERROR in X.java (at line 1)\n" +
3247
			"1. ERROR in X.java (at line 1)\n" + 
3603
			"	public class X<T, F> {\n" +
3248
			"	public class X<T, F> {\n" + 
3604
			"	               ^^^^\n" +
3249
			"	               ^^^^\n" + 
3605
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3250
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3606
			"----------\n" +
3251
			"----------\n" + 
3607
			"2. ERROR in X.java (at line 4)\n" +
3252
			"2. ERROR in X.java (at line 4)\n" + 
3608
			"	* @see T Variable \n" +
3253
			"	* @see T Variable \n" + 
3609
			"	       ^\n" +
3254
			"	       ^\n" + 
3610
			"Javadoc: T cannot be resolved to a type\n" +
3255
			"Javadoc: Invalid reference\n" + 
3611
			"----------\n" +
3256
			"----------\n" + 
3612
			"3. ERROR in X.java (at line 5)\n" +
3257
			"3. ERROR in X.java (at line 5)\n" + 
3613
			"	* @see F Variable\n" +
3258
			"	* @see F Variable\n" + 
3614
			"	       ^\n" +
3259
			"	       ^\n" + 
3615
			"Javadoc: F cannot be resolved to a type\n" +
3260
			"Javadoc: Invalid reference\n" + 
3616
			"----------\n" +
3261
			"----------\n" + 
3617
			"4. ERROR in X.java (at line 7)\n" +
3262
			"4. ERROR in X.java (at line 7)\n" + 
3618
			"	class Entry<L, R> {\n" +
3263
			"	class Entry<L, R> {\n" + 
3619
			"	            ^^^^\n" +
3264
			"	            ^^^^\n" + 
3620
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3265
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3621
			"----------\n"
3266
			"----------\n"
3622
		);
3267
		);
3623
	}
3268
	}
Lines 3696-3711 Link Here
3696
			"	public class Test<T> {\n" +
3341
			"	public class Test<T> {\n" +
3697
			"	                  ^\n" +
3342
			"	                  ^\n" +
3698
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3343
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3699
			"----------\n" +
3700
			"2. ERROR in Test.java (at line 7)\n" +
3701
			"	T field;\n" +
3702
			"	^\n" +
3703
			"T cannot be resolved to a type\n" +
3704
			"----------\n" +
3705
			"3. ERROR in Test.java (at line 8)\n" +
3706
			"	T foo() { return null; }\n" +
3707
			"	^\n" +
3708
			"T cannot be resolved to a type\n" +
3709
			"----------\n");
3344
			"----------\n");
3710
	}
3345
	}
3711
3346
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java (-803 / +437 lines)
Lines 1288-1314 Link Here
1288
					"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" +
1288
					"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" +
1289
					"}"
1289
					"}"
1290
			},
1290
			},
1291
			"----------\n" +
1291
			"----------\n" + 
1292
				"1. ERROR in X.java (at line 4)\n" +
1292
			"1. ERROR in X.java (at line 4)\n" + 
1293
				"	* @param <T> Type parameter 2\n" +
1293
			"	* @param <T> Type parameter 2\n" + 
1294
				"	         ^^^\n" +
1294
			"	         ^^^\n" + 
1295
				"Javadoc: Invalid param tag name\n" +
1295
			"Javadoc: Invalid param tag name\n" + 
1296
				"----------\n" +
1296
			"----------\n" + 
1297
				"2. ERROR in X.java (at line 5)\n" +
1297
			"2. ERROR in X.java (at line 5)\n" + 
1298
				"	* @param <V> Type parameter 2\n" +
1298
			"	* @param <V> Type parameter 2\n" + 
1299
				"	         ^^^\n" +
1299
			"	         ^^^\n" + 
1300
				"Javadoc: Invalid param tag name\n" +
1300
			"Javadoc: Invalid param tag name\n" + 
1301
				"----------\n" +
1301
			"----------\n" + 
1302
				"3. ERROR in X.java (at line 6)\n" +
1302
			"3. ERROR in X.java (at line 6)\n" + 
1303
				"	* @param <U> Type parameter 1\n" +
1303
			"	* @param <U> Type parameter 1\n" + 
1304
				"	         ^^^\n" +
1304
			"	         ^^^\n" + 
1305
				"Javadoc: Invalid param tag name\n" +
1305
			"Javadoc: Invalid param tag name\n" + 
1306
				"----------\n" +
1306
			"----------\n" + 
1307
				"4. ERROR in X.java (at line 10)\n" +
1307
			"4. ERROR in X.java (at line 10)\n" + 
1308
				"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" +
1308
			"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" + 
1309
				"	        ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
1309
			"	        ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
1310
				"Syntax error, type parameters are only available if source level is 1.5\n" +
1310
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1311
				"----------\n"
1311
			"----------\n" + 
1312
			"5. ERROR in X.java (at line 10)\n" + 
1313
			"	public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" + 
1314
			"	                        ^^^^^^^^^^\n" + 
1315
			"Exceptions cannot be resolved to a type\n" + 
1316
			"----------\n"
1312
		);
1317
		);
1313
	}
1318
	}
1314
	public void test038() {
1319
	public void test038() {
Lines 1438-1473 Link Here
1438
				"	G(E e) {}\n" +
1443
				"	G(E e) {}\n" +
1439
				"}\n"
1444
				"}\n"
1440
			},
1445
			},
1441
			"----------\n" +
1446
			"----------\n" + 
1442
			"1. ERROR in X.java (at line 2)\n" +
1447
			"1. ERROR in X.java (at line 2)\n" + 
1443
			"	* @see G#G(Object)\n" +
1448
			"	* @see G#G(Object)\n" + 
1444
			"	         ^^^^^^^^^\n" +
1449
			"	         ^^^^^^^^^\n" + 
1445
			"Javadoc: The constructor G(Object) is undefined\n" +
1450
			"Javadoc: The constructor G(Object) is undefined\n" + 
1446
			"----------\n" +
1451
			"----------\n" + 
1447
			"2. ERROR in X.java (at line 3)\n" +
1452
			"2. ERROR in X.java (at line 5)\n" + 
1448
			"	* @see G#G(Exception)\n" +
1453
			"	public class X extends G<Exception> {\n" + 
1449
			"	         ^^^^^^^^^^^^\n" +
1454
			"	                         ^^^^^^^^^\n" + 
1450
			"Javadoc: The constructor G(Exception) is undefined\n" +
1455
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1451
			"----------\n" +
1456
			"----------\n" + 
1452
			"3. ERROR in X.java (at line 5)\n" +
1457
			"3. ERROR in X.java (at line 8)\n" + 
1453
			"	public class X extends G<Exception> {\n" +
1458
			"	class G<E extends Exception> {\n" + 
1454
			"	                         ^^^^^^^^^\n" +
1459
			"	        ^^^^^^^^^^^^^^^^^^^\n" + 
1455
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1460
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1456
			"----------\n" +
1457
			"4. ERROR in X.java (at line 6)\n" +
1458
			"	X(Exception exc) { super(exc);}\n" +
1459
			"	                   ^^^^^^^^^^^\n" +
1460
			"The constructor G(E) refers to the missing type E\n" +
1461
			"----------\n" +
1462
			"5. ERROR in X.java (at line 8)\n" +
1463
			"	class G<E extends Exception> {\n" +
1464
			"	        ^^^^^^^^^^^^^^^^^^^\n" +
1465
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1466
			"----------\n" +
1467
			"6. ERROR in X.java (at line 9)\n" +
1468
			"	G(E e) {}\n" +
1469
			"	  ^\n" +
1470
			"E cannot be resolved to a type\n" +
1471
			"----------\n");
1461
			"----------\n");
1472
	}
1462
	}
1473
1463
Lines 1497-1527 Link Here
1497
				"    public void testCompareTo() {}\n" +
1487
				"    public void testCompareTo() {}\n" +
1498
				"}"
1488
				"}"
1499
			},
1489
			},
1500
			"----------\n" +
1490
			"----------\n" + 
1501
			"1. ERROR in X.java (at line 2)\n" +
1491
			"1. ERROR in X.java (at line 2)\n" + 
1502
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" +
1492
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" + 
1503
			"	               ^^^^^^^^^^^^^^^^^^^^\n" +
1493
			"	               ^^^^^^^^^^^^^^^^^^^^\n" + 
1504
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1494
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1505
			"----------\n" +
1495
			"----------\n" + 
1506
			"2. ERROR in X.java (at line 2)\n" +
1496
			"2. ERROR in X.java (at line 2)\n" + 
1507
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" +
1497
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" + 
1508
			"	                                                                                                                         ^\n" +
1498
			"	                                                                                                                         ^\n" + 
1509
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1499
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1510
			"----------\n" +
1500
			"----------\n" + 
1511
			"3. ERROR in X.java (at line 2)\n" +
1501
			"3. ERROR in X.java (at line 6)\n" + 
1512
			"	public static <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime,  final Class<T> type) throws ClassCastException\n" +
1502
			"	public static <X extends Comparable< ? super X>> int compareTo(final X first, final X firstPrime)\n" + 
1513
			"	                                                                                                                         ^\n" +
1503
			"	               ^^^^^^^^^^^^^^^^^^^^\n" + 
1514
			"T cannot be resolved to a type\n" +
1504
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1515
			"----------\n" +
1505
			"----------\n" + 
1516
			"4. ERROR in X.java (at line 6)\n" +
1506
			"4. WARNING in X.java (at line 6)\n" + 
1517
			"	public static <X extends Comparable< ? super X>> int compareTo(final X first, final X firstPrime)\n" +
1507
			"	public static <X extends Comparable< ? super X>> int compareTo(final X first, final X firstPrime)\n" + 
1518
			"	               ^^^^^^^^^^^^^^^^^^^^\n" +
1508
			"	               ^\n" + 
1519
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1509
			"The type parameter X is hiding the type X\n" + 
1520
			"----------\n" +
1510
			"----------\n" + 
1521
			"5. ERROR in X.java (at line 14)\n" +
1511
			"5. ERROR in X.java (at line 14)\n" + 
1522
			"	*  {@link ComparableUtils#compareTo(Object, Object)}.\n" +
1512
			"	*  {@link ComparableUtils#compareTo(Object, Object)}.\n" + 
1523
			"	                          ^^^^^^^^^\n" +
1513
			"	                          ^^^^^^^^^\n" + 
1524
			"Javadoc: The method compareTo(Object, Object, Class) in the type ComparableUtils is not applicable for the arguments (Object, Object)\n" +
1514
			"Javadoc: Bound mismatch: The generic method compareTo(X, X) of type ComparableUtils is not applicable for the arguments (Object, Object). The inferred type Object is not a valid substitute for the bounded parameter <X extends Comparable<? super X>>\n" + 
1525
			"----------\n");
1515
			"----------\n");
1526
	}
1516
	}
1527
1517
Lines 1560-1630 Link Here
1560
				"    }\n" +
1550
				"    }\n" +
1561
				"}\n"
1551
				"}\n"
1562
			},
1552
			},
1563
			"----------\n" +
1553
			"----------\n" + 
1564
			"1. ERROR in Test.java (at line 2)\n" +
1554
			"1. ERROR in Test.java (at line 2)\n" + 
1565
			"	* @see Test#add(T) \n" +
1555
			"	* @see Test#add(T) \n" + 
1566
			"	                ^\n" +
1556
			"	            ^^^\n" + 
1567
			"Javadoc: T cannot be resolved to a type\n" +
1557
			"Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + 
1568
			"----------\n" +
1558
			"----------\n" + 
1569
			"2. ERROR in Test.java (at line 3)\n" +
1559
			"2. ERROR in Test.java (at line 3)\n" + 
1570
			"	* @see #add(T)\n" +
1560
			"	* @see #add(T)\n" + 
1571
			"	            ^\n" +
1561
			"	        ^^^\n" + 
1572
			"Javadoc: T cannot be resolved to a type\n" +
1562
			"Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + 
1573
			"----------\n" +
1563
			"----------\n" + 
1574
			"3. ERROR in Test.java (at line 4)\n" +
1564
			"3. ERROR in Test.java (at line 4)\n" + 
1575
			"	* @see Test#Test(T)\n" +
1565
			"	* @see Test#Test(T)\n" + 
1576
			"	                 ^\n" +
1566
			"	            ^^^^^^^\n" + 
1577
			"Javadoc: T cannot be resolved to a type\n" +
1567
			"Javadoc: The constructor Test(T) is undefined\n" + 
1578
			"----------\n" +
1568
			"----------\n" + 
1579
			"4. ERROR in Test.java (at line 5)\n" +
1569
			"4. ERROR in Test.java (at line 5)\n" + 
1580
			"	* @see #Test(T)\n" +
1570
			"	* @see #Test(T)\n" + 
1581
			"	             ^\n" +
1571
			"	        ^^^^^^^\n" + 
1582
			"Javadoc: T cannot be resolved to a type\n" +
1572
			"Javadoc: The constructor Test(T) is undefined\n" + 
1583
			"----------\n" +
1573
			"----------\n" + 
1584
			"5. ERROR in Test.java (at line 11)\n" +
1574
			"5. ERROR in Test.java (at line 11)\n" + 
1585
			"	public class Test<T> {\n" +
1575
			"	public class Test<T> {\n" + 
1586
			"	                  ^\n" +
1576
			"	                  ^\n" + 
1587
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1577
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1588
			"----------\n" +
1578
			"----------\n" + 
1589
			"6. ERROR in Test.java (at line 12)\n" +
1579
			"6. ERROR in Test.java (at line 18)\n" + 
1590
			"	Test(T t) {}\n" +
1580
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1591
			"	     ^\n" +
1581
			"	          ^^^^^^^^^^^^^^^^\n" + 
1592
			"T cannot be resolved to a type\n" +
1582
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1593
			"----------\n" +
1583
			"----------\n" + 
1594
			"7. ERROR in Test.java (at line 13)\n" +
1584
			"7. ERROR in Test.java (at line 18)\n" + 
1595
			"	public boolean add(T t) {\n" +
1585
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1596
			"	                   ^\n" +
1586
			"	                                         ^\n" + 
1597
			"T cannot be resolved to a type\n" +
1587
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1598
			"----------\n" +
1599
			"8. ERROR in Test.java (at line 18)\n" +
1600
			"	class Sub<E extends Number> extends Test<E> {\n" +
1601
			"	          ^^^^^^^^^^^^^^^^\n" +
1602
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1603
			"----------\n" +
1604
			"9. ERROR in Test.java (at line 18)\n" +
1605
			"	class Sub<E extends Number> extends Test<E> {\n" +
1606
			"	                                         ^\n" +
1607
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1608
			"----------\n" +
1609
			"10. ERROR in Test.java (at line 18)\n" +
1610
			"	class Sub<E extends Number> extends Test<E> {\n" +
1611
			"	                                         ^\n" +
1612
			"E cannot be resolved to a type\n" +
1613
			"----------\n" +
1614
			"11. ERROR in Test.java (at line 19)\n" +
1615
			"	Sub (E e) {super(null);}\n" +
1616
			"	     ^\n" +
1617
			"E cannot be resolved to a type\n" +
1618
			"----------\n" +
1619
			"12. ERROR in Test.java (at line 19)\n" +
1620
			"	Sub (E e) {super(null);}\n" +
1621
			"	           ^^^^^^^^^^^^\n" +
1622
			"The constructor Test(T) refers to the missing type T\n" +
1623
			"----------\n" +
1624
			"13. ERROR in Test.java (at line 20)\n" +
1625
			"	public boolean add(E e) {\n" +
1626
			"	                   ^\n" +
1627
			"E cannot be resolved to a type\n" +
1628
			"----------\n");
1588
			"----------\n");
1629
	}
1589
	}
1630
	public void testBug83127b() {
1590
	public void testBug83127b() {
Lines 1658-1718 Link Here
1658
				"    }\n" +
1618
				"    }\n" +
1659
				"}\n"
1619
				"}\n"
1660
			},
1620
			},
1661
			"----------\n" +
1621
			"----------\n" + 
1662
			"1. ERROR in Test.java (at line 2)\n" +
1622
			"1. ERROR in Test.java (at line 2)\n" + 
1663
			"	* @see Sub#add(T)\n" +
1623
			"	* @see Sub#add(T)\n" + 
1664
			"	               ^\n" +
1624
			"	           ^^^\n" + 
1665
			"Javadoc: T cannot be resolved to a type\n" +
1625
			"Javadoc: The method add(Number) in the type Sub is not applicable for the arguments (T)\n" + 
1666
			"----------\n" +
1626
			"----------\n" + 
1667
			"2. ERROR in Test.java (at line 3)\n" +
1627
			"2. ERROR in Test.java (at line 3)\n" + 
1668
			"	* @see Sub#Sub(T)\n" +
1628
			"	* @see Sub#Sub(T)\n" + 
1669
			"	               ^\n" +
1629
			"	           ^^^^^^\n" + 
1670
			"Javadoc: T cannot be resolved to a type\n" +
1630
			"Javadoc: The constructor Sub(T) is undefined\n" + 
1671
			"----------\n" +
1631
			"----------\n" + 
1672
			"3. ERROR in Test.java (at line 11)\n" +
1632
			"3. ERROR in Test.java (at line 11)\n" + 
1673
			"	public class Test<T>{\n" +
1633
			"	public class Test<T>{\n" + 
1674
			"	                  ^\n" +
1634
			"	                  ^\n" + 
1675
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1635
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1676
			"----------\n" +
1636
			"----------\n" + 
1677
			"4. ERROR in Test.java (at line 12)\n" +
1637
			"4. ERROR in Test.java (at line 18)\n" + 
1678
			"	Test(T t) {}\n" +
1638
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1679
			"	     ^\n" +
1639
			"	          ^^^^^^^^^^^^^^^^\n" + 
1680
			"T cannot be resolved to a type\n" +
1640
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1681
			"----------\n" +
1641
			"----------\n" + 
1682
			"5. ERROR in Test.java (at line 13)\n" +
1642
			"5. ERROR in Test.java (at line 18)\n" + 
1683
			"	public boolean add(T t) {\n" +
1643
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1684
			"	                   ^\n" +
1644
			"	                                         ^\n" + 
1685
			"T cannot be resolved to a type\n" +
1645
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1686
			"----------\n" +
1687
			"6. ERROR in Test.java (at line 18)\n" +
1688
			"	class Sub<E extends Number> extends Test<E> {\n" +
1689
			"	          ^^^^^^^^^^^^^^^^\n" +
1690
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1691
			"----------\n" +
1692
			"7. ERROR in Test.java (at line 18)\n" +
1693
			"	class Sub<E extends Number> extends Test<E> {\n" +
1694
			"	                                         ^\n" +
1695
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1696
			"----------\n" +
1697
			"8. ERROR in Test.java (at line 18)\n" +
1698
			"	class Sub<E extends Number> extends Test<E> {\n" +
1699
			"	                                         ^\n" +
1700
			"E cannot be resolved to a type\n" +
1701
			"----------\n" +
1702
			"9. ERROR in Test.java (at line 19)\n" +
1703
			"	Sub (E e) {super(null);}\n" +
1704
			"	     ^\n" +
1705
			"E cannot be resolved to a type\n" +
1706
			"----------\n" +
1707
			"10. ERROR in Test.java (at line 19)\n" +
1708
			"	Sub (E e) {super(null);}\n" +
1709
			"	           ^^^^^^^^^^^^\n" +
1710
			"The constructor Test(T) refers to the missing type T\n" +
1711
			"----------\n" +
1712
			"11. ERROR in Test.java (at line 20)\n" +
1713
			"	public boolean add(E e) {\n" +
1714
			"	                   ^\n" +
1715
			"E cannot be resolved to a type\n" +
1716
			"----------\n");
1646
			"----------\n");
1717
	}
1647
	}
1718
	public void testBug83127c() {
1648
	public void testBug83127c() {
Lines 1743-1803 Link Here
1743
				"    }\n" +
1673
				"    }\n" +
1744
				"}\n"
1674
				"}\n"
1745
			},
1675
			},
1746
			"----------\n" +
1676
			"----------\n" + 
1747
			"1. ERROR in Test.java (at line 2)\n" +
1677
			"1. ERROR in Test.java (at line 2)\n" + 
1748
			"	* @see Sub#add(E) \n" +
1678
			"	* @see Sub#add(E) \n" + 
1749
			"	               ^\n" +
1679
			"	               ^\n" + 
1750
			"Javadoc: E cannot be resolved to a type\n" +
1680
			"Javadoc: E cannot be resolved to a type\n" + 
1751
			"----------\n" +
1681
			"----------\n" + 
1752
			"2. ERROR in Test.java (at line 3)\n" +
1682
			"2. ERROR in Test.java (at line 3)\n" + 
1753
			"	* @see Sub#Sub(E)\n" +
1683
			"	* @see Sub#Sub(E)\n" + 
1754
			"	               ^\n" +
1684
			"	               ^\n" + 
1755
			"Javadoc: E cannot be resolved to a type\n" +
1685
			"Javadoc: E cannot be resolved to a type\n" + 
1756
			"----------\n" +
1686
			"----------\n" + 
1757
			"3. ERROR in Test.java (at line 8)\n" +
1687
			"3. ERROR in Test.java (at line 8)\n" + 
1758
			"	public class Test<T>{\n" +
1688
			"	public class Test<T>{\n" + 
1759
			"	                  ^\n" +
1689
			"	                  ^\n" + 
1760
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1690
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1761
			"----------\n" +
1691
			"----------\n" + 
1762
			"4. ERROR in Test.java (at line 9)\n" +
1692
			"4. ERROR in Test.java (at line 15)\n" + 
1763
			"	Test(T t) {}\n" +
1693
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1764
			"	     ^\n" +
1694
			"	          ^^^^^^^^^^^^^^^^\n" + 
1765
			"T cannot be resolved to a type\n" +
1695
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1766
			"----------\n" +
1696
			"----------\n" + 
1767
			"5. ERROR in Test.java (at line 10)\n" +
1697
			"5. ERROR in Test.java (at line 15)\n" + 
1768
			"	public boolean add(T t) {\n" +
1698
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1769
			"	                   ^\n" +
1699
			"	                                         ^\n" + 
1770
			"T cannot be resolved to a type\n" +
1700
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1771
			"----------\n" +
1772
			"6. ERROR in Test.java (at line 15)\n" +
1773
			"	class Sub<E extends Number> extends Test<E> {\n" +
1774
			"	          ^^^^^^^^^^^^^^^^\n" +
1775
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1776
			"----------\n" +
1777
			"7. ERROR in Test.java (at line 15)\n" +
1778
			"	class Sub<E extends Number> extends Test<E> {\n" +
1779
			"	                                         ^\n" +
1780
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1781
			"----------\n" +
1782
			"8. ERROR in Test.java (at line 15)\n" +
1783
			"	class Sub<E extends Number> extends Test<E> {\n" +
1784
			"	                                         ^\n" +
1785
			"E cannot be resolved to a type\n" +
1786
			"----------\n" +
1787
			"9. ERROR in Test.java (at line 16)\n" +
1788
			"	Sub (E e) {super(null);}\n" +
1789
			"	     ^\n" +
1790
			"E cannot be resolved to a type\n" +
1791
			"----------\n" +
1792
			"10. ERROR in Test.java (at line 16)\n" +
1793
			"	Sub (E e) {super(null);}\n" +
1794
			"	           ^^^^^^^^^^^^\n" +
1795
			"The constructor Test(T) refers to the missing type T\n" +
1796
			"----------\n" +
1797
			"11. ERROR in Test.java (at line 17)\n" +
1798
			"	public boolean add(E e) {\n" +
1799
			"	                   ^\n" +
1800
			"E cannot be resolved to a type\n" +
1801
			"----------\n");
1701
			"----------\n");
1802
	}
1702
	}
1803
	public void testBug83127d() {
1703
	public void testBug83127d() {
Lines 1833-1909 Link Here
1833
				"    }\n" +
1733
				"    }\n" +
1834
				"}\n"
1734
				"}\n"
1835
			},
1735
			},
1836
			"----------\n" +
1736
			"----------\n" + 
1837
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1737
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
1838
			"	public class Unrelated1<E extends Number> {\n" +
1738
			"	public class Unrelated1<E extends Number> {\n" + 
1839
			"	                        ^^^^^^^^^^^^^^^^\n" +
1739
			"	                        ^^^^^^^^^^^^^^^^\n" + 
1840
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1740
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1841
			"----------\n" +
1741
			"----------\n" + 
1842
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1742
			"----------\n" + 
1843
			"	public Unrelated1(E e) {}\n" +
1743
			"1. ERROR in Test.java (at line 2)\n" + 
1844
			"	                  ^\n" +
1744
			"	* @see Unrelated1#add(E)\n" + 
1845
			"E cannot be resolved to a type\n" +
1745
			"	                      ^\n" + 
1846
			"----------\n" +
1746
			"Javadoc: E cannot be resolved to a type\n" + 
1847
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1747
			"----------\n" + 
1848
			"	public boolean add(E e) { return false; }\n" +
1748
			"2. ERROR in Test.java (at line 3)\n" + 
1849
			"	                   ^\n" +
1749
			"	* @see Unrelated1#Unrelated1(E)\n" + 
1850
			"E cannot be resolved to a type\n" +
1750
			"	                             ^\n" + 
1851
			"----------\n" +
1751
			"Javadoc: E cannot be resolved to a type\n" + 
1852
			"----------\n" +
1752
			"----------\n" + 
1853
			"1. ERROR in Test.java (at line 2)\n" +
1753
			"3. ERROR in Test.java (at line 8)\n" + 
1854
			"	* @see Unrelated1#add(E)\n" +
1754
			"	public class Test<T>{\n" + 
1855
			"	                      ^\n" +
1755
			"	                  ^\n" + 
1856
			"Javadoc: E cannot be resolved to a type\n" +
1756
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1857
			"----------\n" +
1757
			"----------\n" + 
1858
			"2. ERROR in Test.java (at line 3)\n" +
1758
			"4. ERROR in Test.java (at line 15)\n" + 
1859
			"	* @see Unrelated1#Unrelated1(E)\n" +
1759
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1860
			"	                             ^\n" +
1760
			"	          ^^^^^^^^^^^^^^^^\n" + 
1861
			"Javadoc: E cannot be resolved to a type\n" +
1761
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1862
			"----------\n" +
1762
			"----------\n" + 
1863
			"3. ERROR in Test.java (at line 8)\n" +
1763
			"5. ERROR in Test.java (at line 15)\n" + 
1864
			"	public class Test<T>{\n" +
1764
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1865
			"	                  ^\n" +
1765
			"	                                         ^\n" + 
1866
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1766
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1867
			"----------\n" +
1868
			"4. ERROR in Test.java (at line 9)\n" +
1869
			"	Test(T t) {}\n" +
1870
			"	     ^\n" +
1871
			"T cannot be resolved to a type\n" +
1872
			"----------\n" +
1873
			"5. ERROR in Test.java (at line 10)\n" +
1874
			"	public boolean add(T t) {\n" +
1875
			"	                   ^\n" +
1876
			"T cannot be resolved to a type\n" +
1877
			"----------\n" +
1878
			"6. ERROR in Test.java (at line 15)\n" +
1879
			"	class Sub<E extends Number> extends Test<E> {\n" +
1880
			"	          ^^^^^^^^^^^^^^^^\n" +
1881
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1882
			"----------\n" +
1883
			"7. ERROR in Test.java (at line 15)\n" +
1884
			"	class Sub<E extends Number> extends Test<E> {\n" +
1885
			"	                                         ^\n" +
1886
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1887
			"----------\n" +
1888
			"8. ERROR in Test.java (at line 15)\n" +
1889
			"	class Sub<E extends Number> extends Test<E> {\n" +
1890
			"	                                         ^\n" +
1891
			"E cannot be resolved to a type\n" +
1892
			"----------\n" +
1893
			"9. ERROR in Test.java (at line 16)\n" +
1894
			"	Sub (E e) {super(null);}\n" +
1895
			"	     ^\n" +
1896
			"E cannot be resolved to a type\n" +
1897
			"----------\n" +
1898
			"10. ERROR in Test.java (at line 16)\n" +
1899
			"	Sub (E e) {super(null);}\n" +
1900
			"	           ^^^^^^^^^^^^\n" +
1901
			"The constructor Test(T) refers to the missing type T\n" +
1902
			"----------\n" +
1903
			"11. ERROR in Test.java (at line 17)\n" +
1904
			"	public boolean add(E e) {\n" +
1905
			"	                   ^\n" +
1906
			"E cannot be resolved to a type\n" +
1907
			"----------\n");
1767
			"----------\n");
1908
	}
1768
	}
1909
	public void testBug83127e() {
1769
	public void testBug83127e() {
Lines 1939-2015 Link Here
1939
				"    }\n" +
1799
				"    }\n" +
1940
				"}\n"
1800
				"}\n"
1941
			},
1801
			},
1942
			"----------\n" +
1802
			"----------\n" + 
1943
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1803
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
1944
			"	public class Unrelated1<E extends Number> {\n" +
1804
			"	public class Unrelated1<E extends Number> {\n" + 
1945
			"	                        ^^^^^^^^^^^^^^^^\n" +
1805
			"	                        ^^^^^^^^^^^^^^^^\n" + 
1946
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1806
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1947
			"----------\n" +
1807
			"----------\n" + 
1948
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1808
			"----------\n" + 
1949
			"	public Unrelated1(E e) {}\n" +
1809
			"1. ERROR in Test.java (at line 2)\n" + 
1950
			"	                  ^\n" +
1810
			"	* @see Unrelated1#add(Object)\n" + 
1951
			"E cannot be resolved to a type\n" +
1811
			"	                  ^^^\n" + 
1952
			"----------\n" +
1812
			"Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Object)\n" + 
1953
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1813
			"----------\n" + 
1954
			"	public boolean add(E e) { return false; }\n" +
1814
			"2. ERROR in Test.java (at line 3)\n" + 
1955
			"	                   ^\n" +
1815
			"	* @see Unrelated1#Unrelated1(Object)\n" + 
1956
			"E cannot be resolved to a type\n" +
1816
			"	                  ^^^^^^^^^^^^^^^^^^\n" + 
1957
			"----------\n" +
1817
			"Javadoc: The constructor Unrelated1(Object) is undefined\n" + 
1958
			"----------\n" +
1818
			"----------\n" + 
1959
			"1. ERROR in Test.java (at line 2)\n" +
1819
			"3. ERROR in Test.java (at line 9)\n" + 
1960
			"	* @see Unrelated1#add(Object)\n" +
1820
			"	public class Test<T>{\n" + 
1961
			"	                  ^^^\n" +
1821
			"	                  ^\n" + 
1962
			"Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Object)\n" +
1822
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1963
			"----------\n" +
1823
			"----------\n" + 
1964
			"2. ERROR in Test.java (at line 3)\n" +
1824
			"4. ERROR in Test.java (at line 15)\n" + 
1965
			"	* @see Unrelated1#Unrelated1(Object)\n" +
1825
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1966
			"	                  ^^^^^^^^^^^^^^^^^^\n" +
1826
			"	          ^^^^^^^^^^^^^^^^\n" + 
1967
			"Javadoc: The constructor Unrelated1(Object) is undefined\n" +
1827
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
1968
			"----------\n" +
1828
			"----------\n" + 
1969
			"3. ERROR in Test.java (at line 9)\n" +
1829
			"5. ERROR in Test.java (at line 15)\n" + 
1970
			"	public class Test<T>{\n" +
1830
			"	class Sub<E extends Number> extends Test<E> {\n" + 
1971
			"	                  ^\n" +
1831
			"	                                         ^\n" + 
1972
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1832
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
1973
			"----------\n" +
1974
			"4. ERROR in Test.java (at line 10)\n" +
1975
			"	Test(T t) {}\n" +
1976
			"	     ^\n" +
1977
			"T cannot be resolved to a type\n" +
1978
			"----------\n" +
1979
			"5. ERROR in Test.java (at line 11)\n" +
1980
			"	public boolean add(T t) {\n" +
1981
			"	                   ^\n" +
1982
			"T cannot be resolved to a type\n" +
1983
			"----------\n" +
1984
			"6. ERROR in Test.java (at line 15)\n" +
1985
			"	class Sub<E extends Number> extends Test<E> {\n" +
1986
			"	          ^^^^^^^^^^^^^^^^\n" +
1987
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1988
			"----------\n" +
1989
			"7. ERROR in Test.java (at line 15)\n" +
1990
			"	class Sub<E extends Number> extends Test<E> {\n" +
1991
			"	                                         ^\n" +
1992
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
1993
			"----------\n" +
1994
			"8. ERROR in Test.java (at line 15)\n" +
1995
			"	class Sub<E extends Number> extends Test<E> {\n" +
1996
			"	                                         ^\n" +
1997
			"E cannot be resolved to a type\n" +
1998
			"----------\n" +
1999
			"9. ERROR in Test.java (at line 16)\n" +
2000
			"	Sub (E e) {super(null);}\n" +
2001
			"	     ^\n" +
2002
			"E cannot be resolved to a type\n" +
2003
			"----------\n" +
2004
			"10. ERROR in Test.java (at line 16)\n" +
2005
			"	Sub (E e) {super(null);}\n" +
2006
			"	           ^^^^^^^^^^^^\n" +
2007
			"The constructor Test(T) refers to the missing type T\n" +
2008
			"----------\n" +
2009
			"11. ERROR in Test.java (at line 17)\n" +
2010
			"	public boolean add(E e) {\n" +
2011
			"	                   ^\n" +
2012
			"E cannot be resolved to a type\n" +
2013
			"----------\n");
1833
			"----------\n");
2014
	}
1834
	}
2015
	public void testBug83127f() {
1835
	public void testBug83127f() {
Lines 2044-2120 Link Here
2044
				"    }\n" +
1864
				"    }\n" +
2045
				"}\n"
1865
				"}\n"
2046
			},
1866
			},
2047
			"----------\n" +
1867
			"----------\n" + 
2048
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1868
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
2049
			"	public class Unrelated1<E extends Number> {\n" +
1869
			"	public class Unrelated1<E extends Number> {\n" + 
2050
			"	                        ^^^^^^^^^^^^^^^^\n" +
1870
			"	                        ^^^^^^^^^^^^^^^^\n" + 
2051
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1871
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2052
			"----------\n" +
1872
			"----------\n" + 
2053
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1873
			"----------\n" + 
2054
			"	public Unrelated1(E e) {}\n" +
1874
			"1. ERROR in Test.java (at line 8)\n" + 
2055
			"	                  ^\n" +
1875
			"	public class Test<T>{\n" + 
2056
			"E cannot be resolved to a type\n" +
1876
			"	                  ^\n" + 
2057
			"----------\n" +
1877
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2058
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1878
			"----------\n" + 
2059
			"	public boolean add(E e) { return false; }\n" +
1879
			"2. ERROR in Test.java (at line 14)\n" + 
2060
			"	                   ^\n" +
1880
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2061
			"E cannot be resolved to a type\n" +
1881
			"	          ^^^^^^^^^^^^^^^^\n" + 
2062
			"----------\n" +
1882
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2063
			"----------\n" +
1883
			"----------\n" + 
2064
			"1. ERROR in Test.java (at line 2)\n" +
1884
			"3. ERROR in Test.java (at line 14)\n" + 
2065
			"	* @see Unrelated1#add(Number)\n" +
1885
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2066
			"	                  ^^^\n" +
1886
			"	                                         ^\n" + 
2067
			"Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Number)\n" +
1887
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2068
			"----------\n" +
2069
			"2. ERROR in Test.java (at line 3)\n" +
2070
			"	* @see Unrelated1#Unrelated1(Number)\n" +
2071
			"	                  ^^^^^^^^^^^^^^^^^^\n" +
2072
			"Javadoc: The constructor Unrelated1(Number) is undefined\n" +
2073
			"----------\n" +
2074
			"3. ERROR in Test.java (at line 8)\n" +
2075
			"	public class Test<T>{\n" +
2076
			"	                  ^\n" +
2077
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2078
			"----------\n" +
2079
			"4. ERROR in Test.java (at line 9)\n" +
2080
			"	Test(T t) {}\n" +
2081
			"	     ^\n" +
2082
			"T cannot be resolved to a type\n" +
2083
			"----------\n" +
2084
			"5. ERROR in Test.java (at line 10)\n" +
2085
			"	public boolean add(T t) {\n" +
2086
			"	                   ^\n" +
2087
			"T cannot be resolved to a type\n" +
2088
			"----------\n" +
2089
			"6. ERROR in Test.java (at line 14)\n" +
2090
			"	class Sub<E extends Number> extends Test<E> {\n" +
2091
			"	          ^^^^^^^^^^^^^^^^\n" +
2092
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2093
			"----------\n" +
2094
			"7. ERROR in Test.java (at line 14)\n" +
2095
			"	class Sub<E extends Number> extends Test<E> {\n" +
2096
			"	                                         ^\n" +
2097
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2098
			"----------\n" +
2099
			"8. ERROR in Test.java (at line 14)\n" +
2100
			"	class Sub<E extends Number> extends Test<E> {\n" +
2101
			"	                                         ^\n" +
2102
			"E cannot be resolved to a type\n" +
2103
			"----------\n" +
2104
			"9. ERROR in Test.java (at line 15)\n" +
2105
			"	Sub (E e) {super(null);}\n" +
2106
			"	     ^\n" +
2107
			"E cannot be resolved to a type\n" +
2108
			"----------\n" +
2109
			"10. ERROR in Test.java (at line 15)\n" +
2110
			"	Sub (E e) {super(null);}\n" +
2111
			"	           ^^^^^^^^^^^^\n" +
2112
			"The constructor Test(T) refers to the missing type T\n" +
2113
			"----------\n" +
2114
			"11. ERROR in Test.java (at line 16)\n" +
2115
			"	public boolean add(E e) {\n" +
2116
			"	                   ^\n" +
2117
			"E cannot be resolved to a type\n" +
2118
			"----------\n");
1888
			"----------\n");
2119
	}
1889
	}
2120
	public void testBug83127g() {
1890
	public void testBug83127g() {
Lines 2151-2227 Link Here
2151
				"    }\n" +
1921
				"    }\n" +
2152
				"}\n"
1922
				"}\n"
2153
			},
1923
			},
2154
			"----------\n" +
1924
			"----------\n" + 
2155
			"1. ERROR in Unrelated1.java (at line 1)\n" +
1925
			"1. ERROR in Unrelated1.java (at line 1)\n" + 
2156
			"	public class Unrelated1<E extends Number> {\n" +
1926
			"	public class Unrelated1<E extends Number> {\n" + 
2157
			"	                        ^^^^^^^^^^^^^^^^\n" +
1927
			"	                        ^^^^^^^^^^^^^^^^\n" + 
2158
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1928
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2159
			"----------\n" +
1929
			"----------\n" + 
2160
			"2. ERROR in Unrelated1.java (at line 2)\n" +
1930
			"----------\n" + 
2161
			"	public Unrelated1(E e) {}\n" +
1931
			"1. ERROR in Test.java (at line 2)\n" + 
2162
			"	                  ^\n" +
1932
			"	* @see Unrelated1#add(Integer)\n" + 
2163
			"E cannot be resolved to a type\n" +
1933
			"	                  ^^^\n" + 
2164
			"----------\n" +
1934
			"Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Integer)\n" + 
2165
			"3. ERROR in Unrelated1.java (at line 3)\n" +
1935
			"----------\n" + 
2166
			"	public boolean add(E e) { return false; }\n" +
1936
			"2. ERROR in Test.java (at line 3)\n" + 
2167
			"	                   ^\n" +
1937
			"	* @see Unrelated1#Unrelated1(Integer)\n" + 
2168
			"E cannot be resolved to a type\n" +
1938
			"	                  ^^^^^^^^^^^^^^^^^^^\n" + 
2169
			"----------\n" +
1939
			"Javadoc: The constructor Unrelated1(Integer) is undefined\n" + 
2170
			"----------\n" +
1940
			"----------\n" + 
2171
			"1. ERROR in Test.java (at line 2)\n" +
1941
			"3. ERROR in Test.java (at line 9)\n" + 
2172
			"	* @see Unrelated1#add(Integer)\n" +
1942
			"	public class Test<T>{\n" + 
2173
			"	                  ^^^\n" +
1943
			"	                  ^\n" + 
2174
			"Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Integer)\n" +
1944
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2175
			"----------\n" +
1945
			"----------\n" + 
2176
			"2. ERROR in Test.java (at line 3)\n" +
1946
			"4. ERROR in Test.java (at line 16)\n" + 
2177
			"	* @see Unrelated1#Unrelated1(Integer)\n" +
1947
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2178
			"	                  ^^^^^^^^^^^^^^^^^^^\n" +
1948
			"	          ^^^^^^^^^^^^^^^^\n" + 
2179
			"Javadoc: The constructor Unrelated1(Integer) is undefined\n" +
1949
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2180
			"----------\n" +
1950
			"----------\n" + 
2181
			"3. ERROR in Test.java (at line 9)\n" +
1951
			"5. ERROR in Test.java (at line 16)\n" + 
2182
			"	public class Test<T>{\n" +
1952
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2183
			"	                  ^\n" +
1953
			"	                                         ^\n" + 
2184
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1954
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2185
			"----------\n" +
2186
			"4. ERROR in Test.java (at line 10)\n" +
2187
			"	Test(T t) {}\n" +
2188
			"	     ^\n" +
2189
			"T cannot be resolved to a type\n" +
2190
			"----------\n" +
2191
			"5. ERROR in Test.java (at line 11)\n" +
2192
			"	public boolean add(T t) {\n" +
2193
			"	                   ^\n" +
2194
			"T cannot be resolved to a type\n" +
2195
			"----------\n" +
2196
			"6. ERROR in Test.java (at line 16)\n" +
2197
			"	class Sub<E extends Number> extends Test<E> {\n" +
2198
			"	          ^^^^^^^^^^^^^^^^\n" +
2199
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2200
			"----------\n" +
2201
			"7. ERROR in Test.java (at line 16)\n" +
2202
			"	class Sub<E extends Number> extends Test<E> {\n" +
2203
			"	                                         ^\n" +
2204
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2205
			"----------\n" +
2206
			"8. ERROR in Test.java (at line 16)\n" +
2207
			"	class Sub<E extends Number> extends Test<E> {\n" +
2208
			"	                                         ^\n" +
2209
			"E cannot be resolved to a type\n" +
2210
			"----------\n" +
2211
			"9. ERROR in Test.java (at line 17)\n" +
2212
			"	Sub (E e) {super(null);}\n" +
2213
			"	     ^\n" +
2214
			"E cannot be resolved to a type\n" +
2215
			"----------\n" +
2216
			"10. ERROR in Test.java (at line 17)\n" +
2217
			"	Sub (E e) {super(null);}\n" +
2218
			"	           ^^^^^^^^^^^^\n" +
2219
			"The constructor Test(T) refers to the missing type T\n" +
2220
			"----------\n" +
2221
			"11. ERROR in Test.java (at line 18)\n" +
2222
			"	public boolean add(E e) {\n" +
2223
			"	                   ^\n" +
2224
			"E cannot be resolved to a type\n" +
2225
			"----------\n");
1955
			"----------\n");
2226
	}
1956
	}
2227
	public void testBug83127h() {
1957
	public void testBug83127h() {
Lines 2258-2324 Link Here
2258
				"    }\n" +
1988
				"    }\n" +
2259
				"}\n"
1989
				"}\n"
2260
			},
1990
			},
2261
			"----------\n" +
1991
			"----------\n" + 
2262
			"1. ERROR in Unrelated2.java (at line 1)\n" +
1992
			"1. ERROR in Unrelated2.java (at line 1)\n" + 
2263
			"	public interface Unrelated2<E> {\n" +
1993
			"	public interface Unrelated2<E> {\n" + 
2264
			"	                            ^\n" +
1994
			"	                            ^\n" + 
2265
			"Syntax error, type parameters are only available if source level is 1.5\n" +
1995
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2266
			"----------\n" +
1996
			"----------\n" + 
2267
			"2. ERROR in Unrelated2.java (at line 2)\n" +
1997
			"----------\n" + 
2268
			"	boolean add(E e);\n" +
1998
			"1. ERROR in Test.java (at line 2)\n" + 
2269
			"	            ^\n" +
1999
			"	* @see Unrelated2#add(T)\n" + 
2270
			"E cannot be resolved to a type\n" +
2000
			"	                  ^^^\n" + 
2271
			"----------\n" +
2001
			"Javadoc: The method add(Object) in the type Unrelated2 is not applicable for the arguments (T)\n" + 
2272
			"----------\n" +
2002
			"----------\n" + 
2273
			"1. ERROR in Test.java (at line 2)\n" +
2003
			"2. ERROR in Test.java (at line 10)\n" + 
2274
			"	* @see Unrelated2#add(T)\n" +
2004
			"	public class Test<T>{\n" + 
2275
			"	                      ^\n" +
2005
			"	                  ^\n" + 
2276
			"Javadoc: T cannot be resolved to a type\n" +
2006
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2277
			"----------\n" +
2007
			"----------\n" + 
2278
			"2. ERROR in Test.java (at line 10)\n" +
2008
			"3. ERROR in Test.java (at line 17)\n" + 
2279
			"	public class Test<T>{\n" +
2009
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2280
			"	                  ^\n" +
2010
			"	          ^^^^^^^^^^^^^^^^\n" + 
2281
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2011
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2282
			"----------\n" +
2012
			"----------\n" + 
2283
			"3. ERROR in Test.java (at line 11)\n" +
2013
			"4. ERROR in Test.java (at line 17)\n" + 
2284
			"	Test(T t) {}\n" +
2014
			"	class Sub<E extends Number> extends Test<E> {\n" + 
2285
			"	     ^\n" +
2015
			"	                                         ^\n" + 
2286
			"T cannot be resolved to a type\n" +
2016
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2287
			"----------\n" +
2288
			"4. ERROR in Test.java (at line 12)\n" +
2289
			"	public boolean add(T t) {\n" +
2290
			"	                   ^\n" +
2291
			"T cannot be resolved to a type\n" +
2292
			"----------\n" +
2293
			"5. ERROR in Test.java (at line 17)\n" +
2294
			"	class Sub<E extends Number> extends Test<E> {\n" +
2295
			"	          ^^^^^^^^^^^^^^^^\n" +
2296
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2297
			"----------\n" +
2298
			"6. ERROR in Test.java (at line 17)\n" +
2299
			"	class Sub<E extends Number> extends Test<E> {\n" +
2300
			"	                                         ^\n" +
2301
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2302
			"----------\n" +
2303
			"7. ERROR in Test.java (at line 17)\n" +
2304
			"	class Sub<E extends Number> extends Test<E> {\n" +
2305
			"	                                         ^\n" +
2306
			"E cannot be resolved to a type\n" +
2307
			"----------\n" +
2308
			"8. ERROR in Test.java (at line 18)\n" +
2309
			"	Sub (E e) {super(null);}\n" +
2310
			"	     ^\n" +
2311
			"E cannot be resolved to a type\n" +
2312
			"----------\n" +
2313
			"9. ERROR in Test.java (at line 18)\n" +
2314
			"	Sub (E e) {super(null);}\n" +
2315
			"	           ^^^^^^^^^^^^\n" +
2316
			"The constructor Test(T) refers to the missing type T\n" +
2317
			"----------\n" +
2318
			"10. ERROR in Test.java (at line 19)\n" +
2319
			"	public boolean add(E e) {\n" +
2320
			"	                   ^\n" +
2321
			"E cannot be resolved to a type\n" +
2322
			"----------\n");
2017
			"----------\n");
2323
	}
2018
	}
2324
2019
Lines 2709-2779 Link Here
2709
				" */\n" +
2404
				" */\n" +
2710
				"class G<T> {}\n"
2405
				"class G<T> {}\n"
2711
			},
2406
			},
2712
			"----------\n" +
2407
			"----------\n" + 
2713
			"1. ERROR in test\\X.java (at line 8)\n" +
2408
			"1. ERROR in test\\X.java (at line 8)\n" + 
2714
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2409
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" + 
2715
			"	        ^\n" +
2410
			"	        ^\n" + 
2716
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2411
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2717
			"----------\n" +
2412
			"----------\n" + 
2718
			"2. ERROR in test\\X.java (at line 8)\n" +
2413
			"2. ERROR in test\\X.java (at line 8)\n" + 
2719
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2414
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" + 
2720
			"	             ^\n" +
2415
			"	             ^\n" + 
2721
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2416
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2722
			"----------\n" +
2417
			"----------\n" + 
2723
			"3. ERROR in test\\X.java (at line 8)\n" +
2418
			"3. ERROR in test\\X.java (at line 8)\n" + 
2724
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2419
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" + 
2725
			"	             ^\n" +
2420
			"	                          ^\n" + 
2726
			"T cannot be resolved to a type\n" +
2421
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2727
			"----------\n" +
2422
			"----------\n" + 
2728
			"4. ERROR in test\\X.java (at line 8)\n" +
2423
			"4. ERROR in test\\X.java (at line 15)\n" + 
2729
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2424
			"	* @param <T>\n" + 
2730
			"	                          ^\n" +
2425
			"	         ^^^\n" + 
2731
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2426
			"Javadoc: Invalid param tag name\n" + 
2732
			"----------\n" +
2427
			"----------\n" + 
2733
			"5. ERROR in test\\X.java (at line 8)\n" +
2428
			"5. ERROR in test\\X.java (at line 19)\n" + 
2734
			"	public <T> G<T> foo(Class<T> stuffClass) {\n" +
2429
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" + 
2735
			"	                          ^\n" +
2430
			"	        ^^^^^^^^^^^^^^^^\n" + 
2736
			"T cannot be resolved to a type\n" +
2431
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2737
			"----------\n" +
2432
			"----------\n" + 
2738
			"6. ERROR in test\\X.java (at line 15)\n" +
2433
			"6. ERROR in test\\X.java (at line 19)\n" + 
2739
			"	* @param <T>\n" +
2434
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" + 
2740
			"	         ^^^\n" +
2435
			"	                            ^\n" + 
2741
			"Javadoc: Invalid param tag name\n" +
2436
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2742
			"----------\n" +
2437
			"----------\n" + 
2743
			"7. ERROR in test\\X.java (at line 19)\n" +
2438
			"7. ERROR in test\\X.java (at line 19)\n" + 
2744
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
2439
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" + 
2745
			"	        ^^^^^^^^^^^^^^^^\n" +
2440
			"	                                         ^\n" + 
2746
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2441
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2747
			"----------\n" +
2442
			"----------\n" + 
2748
			"8. ERROR in test\\X.java (at line 19)\n" +
2443
			"8. ERROR in test\\X.java (at line 22)\n" + 
2749
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
2444
			"	* @param <T>\n" + 
2750
			"	                            ^\n" +
2445
			"	         ^^^\n" + 
2751
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2446
			"Javadoc: Invalid param tag name\n" + 
2752
			"----------\n" +
2447
			"----------\n" + 
2753
			"9. ERROR in test\\X.java (at line 19)\n" +
2448
			"9. ERROR in test\\X.java (at line 24)\n" + 
2754
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
2449
			"	class G<T> {}\n" + 
2755
			"	                            ^\n" +
2450
			"	        ^\n" + 
2756
			"T cannot be resolved to a type\n" +
2451
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2757
			"----------\n" +
2758
			"10. ERROR in test\\X.java (at line 19)\n" +
2759
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
2760
			"	                                         ^\n" +
2761
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2762
			"----------\n" +
2763
			"11. ERROR in test\\X.java (at line 19)\n" +
2764
			"	public <T extends Object> G<T> foo(Class<T> stuffClass);\n" +
2765
			"	                                         ^\n" +
2766
			"T cannot be resolved to a type\n" +
2767
			"----------\n" +
2768
			"12. ERROR in test\\X.java (at line 22)\n" +
2769
			"	* @param <T>\n" +
2770
			"	         ^^^\n" +
2771
			"Javadoc: Invalid param tag name\n" +
2772
			"----------\n" +
2773
			"13. ERROR in test\\X.java (at line 24)\n" +
2774
			"	class G<T> {}\n" +
2775
			"	        ^\n" +
2776
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2777
			"----------\n"
2452
			"----------\n"
2778
		);
2453
		);
2779
	}
2454
	}
Lines 2817-2912 Link Here
2817
				"    }\n" +
2492
				"    }\n" +
2818
				"}\n"
2493
				"}\n"
2819
			},
2494
			},
2820
			"----------\n" +
2495
			"----------\n" + 
2821
			"1. ERROR in test\\X.java (at line 6)\n" +
2496
			"1. ERROR in test\\X.java (at line 6)\n" + 
2822
			"	* @param <T>\n" +
2497
			"	* @param <T>\n" + 
2823
			"	         ^^^\n" +
2498
			"	         ^^^\n" + 
2824
			"Javadoc: Invalid param tag name\n" +
2499
			"Javadoc: Invalid param tag name\n" + 
2825
			"----------\n" +
2500
			"----------\n" + 
2826
			"2. ERROR in test\\X.java (at line 9)\n" +
2501
			"2. ERROR in test\\X.java (at line 9)\n" + 
2827
			"	public <T> X(Class<T> classT) {\n" +
2502
			"	public <T> X(Class<T> classT) {\n" + 
2828
			"	        ^\n" +
2503
			"	        ^\n" + 
2829
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2504
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2830
			"----------\n" +
2505
			"----------\n" + 
2831
			"3. ERROR in test\\X.java (at line 9)\n" +
2506
			"3. ERROR in test\\X.java (at line 9)\n" + 
2832
			"	public <T> X(Class<T> classT) {\n" +
2507
			"	public <T> X(Class<T> classT) {\n" + 
2833
			"	                   ^\n" +
2508
			"	                   ^\n" + 
2834
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2509
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2835
			"----------\n" +
2510
			"----------\n" + 
2836
			"4. ERROR in test\\X.java (at line 9)\n" +
2511
			"4. ERROR in test\\X.java (at line 12)\n" + 
2837
			"	public <T> X(Class<T> classT) {\n" +
2512
			"	* @param <T>\n" + 
2838
			"	                   ^\n" +
2513
			"	         ^^^\n" + 
2839
			"T cannot be resolved to a type\n" +
2514
			"Javadoc: Invalid param tag name\n" + 
2840
			"----------\n" +
2515
			"----------\n" + 
2841
			"5. ERROR in test\\X.java (at line 12)\n" +
2516
			"5. ERROR in test\\X.java (at line 16)\n" + 
2842
			"	* @param <T>\n" +
2517
			"	public <T> Class<T> foo(Class<T> classT) {\n" + 
2843
			"	         ^^^\n" +
2518
			"	        ^\n" + 
2844
			"Javadoc: Invalid param tag name\n" +
2519
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2845
			"----------\n" +
2520
			"----------\n" + 
2846
			"6. ERROR in test\\X.java (at line 16)\n" +
2521
			"6. ERROR in test\\X.java (at line 16)\n" + 
2847
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
2522
			"	public <T> Class<T> foo(Class<T> classT) {\n" + 
2848
			"	        ^\n" +
2523
			"	                 ^\n" + 
2849
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2524
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2850
			"----------\n" +
2525
			"----------\n" + 
2851
			"7. ERROR in test\\X.java (at line 16)\n" +
2526
			"7. ERROR in test\\X.java (at line 16)\n" + 
2852
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
2527
			"	public <T> Class<T> foo(Class<T> classT) {\n" + 
2853
			"	                 ^\n" +
2528
			"	                              ^\n" + 
2854
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2529
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2855
			"----------\n" +
2530
			"----------\n" + 
2856
			"8. ERROR in test\\X.java (at line 16)\n" +
2531
			"8. ERROR in test\\X.java (at line 25)\n" + 
2857
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
2532
			"	public <T> Y(Class<T> classT) {\n" + 
2858
			"	                 ^\n" +
2533
			"	        ^\n" + 
2859
			"T cannot be resolved to a type\n" +
2534
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2860
			"----------\n" +
2535
			"----------\n" + 
2861
			"9. ERROR in test\\X.java (at line 16)\n" +
2536
			"9. ERROR in test\\X.java (at line 25)\n" + 
2862
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
2537
			"	public <T> Y(Class<T> classT) {\n" + 
2863
			"	                              ^\n" +
2538
			"	                   ^\n" + 
2864
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2539
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2865
			"----------\n" +
2540
			"----------\n" + 
2866
			"10. ERROR in test\\X.java (at line 16)\n" +
2541
			"10. ERROR in test\\X.java (at line 32)\n" + 
2867
			"	public <T> Class<T> foo(Class<T> classT) {\n" +
2542
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + 
2868
			"	                              ^\n" +
2543
			"	        ^^^^^^^^^^^^^^^^\n" + 
2869
			"T cannot be resolved to a type\n" +
2544
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
2870
			"----------\n" +
2545
			"----------\n" + 
2871
			"11. ERROR in test\\X.java (at line 25)\n" +
2546
			"11. ERROR in test\\X.java (at line 32)\n" + 
2872
			"	public <T> Y(Class<T> classT) {\n" +
2547
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + 
2873
			"	        ^\n" +
2548
			"	                                ^\n" + 
2874
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2549
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2875
			"----------\n" +
2550
			"----------\n" + 
2876
			"12. ERROR in test\\X.java (at line 25)\n" +
2551
			"12. ERROR in test\\X.java (at line 32)\n" + 
2877
			"	public <T> Y(Class<T> classT) {\n" +
2552
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + 
2878
			"	                   ^\n" +
2553
			"	                                             ^\n" + 
2879
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2554
			"Syntax error, parameterized types are only available if source level is 1.5\n" + 
2880
			"----------\n" +
2881
			"13. ERROR in test\\X.java (at line 25)\n" +
2882
			"	public <T> Y(Class<T> classT) {\n" +
2883
			"	                   ^\n" +
2884
			"T cannot be resolved to a type\n" +
2885
			"----------\n" +
2886
			"14. ERROR in test\\X.java (at line 32)\n" +
2887
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
2888
			"	        ^^^^^^^^^^^^^^^^\n" +
2889
			"Syntax error, type parameters are only available if source level is 1.5\n" +
2890
			"----------\n" +
2891
			"15. ERROR in test\\X.java (at line 32)\n" +
2892
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
2893
			"	                                ^\n" +
2894
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2895
			"----------\n" +
2896
			"16. ERROR in test\\X.java (at line 32)\n" +
2897
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
2898
			"	                                ^\n" +
2899
			"T cannot be resolved to a type\n" +
2900
			"----------\n" +
2901
			"17. ERROR in test\\X.java (at line 32)\n" +
2902
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
2903
			"	                                             ^\n" +
2904
			"Syntax error, parameterized types are only available if source level is 1.5\n" +
2905
			"----------\n" +
2906
			"18. ERROR in test\\X.java (at line 32)\n" +
2907
			"	public <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" +
2908
			"	                                             ^\n" +
2909
			"T cannot be resolved to a type\n" +
2910
			"----------\n"
2555
			"----------\n"
2911
		);
2556
		);
2912
	}
2557
	}
Lines 3523-3548 Link Here
3523
				"	}\n" +
3168
				"	}\n" +
3524
				"}\n"
3169
				"}\n"
3525
			},
3170
			},
3526
			"----------\n" +
3171
			"----------\n" + 
3527
			"1. ERROR in X.java (at line 1)\n" +
3172
			"1. ERROR in X.java (at line 1)\n" + 
3528
			"	public class X<T, F> {\n" +
3173
			"	public class X<T, F> {\n" + 
3529
			"	               ^^^^\n" +
3174
			"	               ^^^^\n" + 
3530
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3175
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3531
			"----------\n" +
3176
			"----------\n" + 
3532
			"2. ERROR in X.java (at line 4)\n" +
3177
			"2. ERROR in X.java (at line 4)\n" + 
3533
			"	* @see T Variable \n" +
3178
			"	* @see T Variable \n" + 
3534
			"	       ^\n" +
3179
			"	       ^\n" + 
3535
			"Javadoc: T cannot be resolved to a type\n" +
3180
			"Javadoc: Invalid reference\n" + 
3536
			"----------\n" +
3181
			"----------\n" + 
3537
			"3. ERROR in X.java (at line 5)\n" +
3182
			"3. ERROR in X.java (at line 5)\n" + 
3538
			"	* @see F Variable\n" +
3183
			"	* @see F Variable\n" + 
3539
			"	       ^\n" +
3184
			"	       ^\n" + 
3540
			"Javadoc: F cannot be resolved to a type\n" +
3185
			"Javadoc: Invalid reference\n" + 
3541
			"----------\n" +
3186
			"----------\n" + 
3542
			"4. ERROR in X.java (at line 7)\n" +
3187
			"4. ERROR in X.java (at line 7)\n" + 
3543
			"	static class Entry<L, R> {\n" +
3188
			"	static class Entry<L, R> {\n" + 
3544
			"	                   ^^^^\n" +
3189
			"	                   ^^^^\n" + 
3545
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3190
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3546
			"----------\n"
3191
			"----------\n"
3547
		);
3192
		);
3548
	}
3193
	}
Lines 3599-3624 Link Here
3599
				"	}\n" +
3244
				"	}\n" +
3600
				"}\n"
3245
				"}\n"
3601
			},
3246
			},
3602
			"----------\n" +
3247
			"----------\n" + 
3603
			"1. ERROR in X.java (at line 1)\n" +
3248
			"1. ERROR in X.java (at line 1)\n" + 
3604
			"	public class X<T, F> {\n" +
3249
			"	public class X<T, F> {\n" + 
3605
			"	               ^^^^\n" +
3250
			"	               ^^^^\n" + 
3606
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3251
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3607
			"----------\n" +
3252
			"----------\n" + 
3608
			"2. ERROR in X.java (at line 4)\n" +
3253
			"2. ERROR in X.java (at line 4)\n" + 
3609
			"	* @see T Variable \n" +
3254
			"	* @see T Variable \n" + 
3610
			"	       ^\n" +
3255
			"	       ^\n" + 
3611
			"Javadoc: T cannot be resolved to a type\n" +
3256
			"Javadoc: Invalid reference\n" + 
3612
			"----------\n" +
3257
			"----------\n" + 
3613
			"3. ERROR in X.java (at line 5)\n" +
3258
			"3. ERROR in X.java (at line 5)\n" + 
3614
			"	* @see F Variable\n" +
3259
			"	* @see F Variable\n" + 
3615
			"	       ^\n" +
3260
			"	       ^\n" + 
3616
			"Javadoc: F cannot be resolved to a type\n" +
3261
			"Javadoc: Invalid reference\n" + 
3617
			"----------\n" +
3262
			"----------\n" + 
3618
			"4. ERROR in X.java (at line 7)\n" +
3263
			"4. ERROR in X.java (at line 7)\n" + 
3619
			"	class Entry<L, R> {\n" +
3264
			"	class Entry<L, R> {\n" + 
3620
			"	            ^^^^\n" +
3265
			"	            ^^^^\n" + 
3621
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3266
			"Syntax error, type parameters are only available if source level is 1.5\n" + 
3622
			"----------\n"
3267
			"----------\n"
3623
		);
3268
		);
3624
	}
3269
	}
Lines 3685-3702 Link Here
3685
			"	public class Test<T> {\n" +
3330
			"	public class Test<T> {\n" +
3686
			"	                  ^\n" +
3331
			"	                  ^\n" +
3687
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3332
			"Syntax error, type parameters are only available if source level is 1.5\n" +
3688
			"----------\n" +
3333
			"----------\n");
3689
			"2. ERROR in Test.java (at line 7)\n" +
3690
			"	T field;\n" +
3691
			"	^\n" +
3692
			"T cannot be resolved to a type\n" +
3693
			"----------\n" +
3694
			"3. ERROR in Test.java (at line 8)\n" +
3695
			"	T foo() { return null; }\n" +
3696
			"	^\n" +
3697
			"T cannot be resolved to a type\n" +
3698
			"----------\n"
3699
		);
3700
	}
3334
	}
3701
3335
3702
	/**
3336
	/**
(-)src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (-2 / +53 lines)
Lines 11010-11017 Link Here
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
		"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" + 
11011
		"----------\n");
11011
		"----------\n");
11012
}
11012
}
11013
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 
11013
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 
11014
public void _test213() {
11014
public void test213() {
11015
	Map compilerOptions15 = getCompilerOptions();
11015
	Map compilerOptions15 = getCompilerOptions();
11016
	compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5);
11016
	compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5);
11017
	compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
11017
	compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
Lines 11061-11064 Link Here
11061
		compilerOptions14,
11061
		compilerOptions14,
11062
		null);
11062
		null);
11063
}
11063
}
11064
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 
11065
public void test213a() {
11066
	Map compilerOptions15 = getCompilerOptions();
11067
	compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5);
11068
	compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
11069
	compilerOptions15.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
11070
	this.runConformTest(
11071
		new String[] {
11072
			"Y.java",
11073
			"public abstract class Y implements I<Y> {\n" + 
11074
			"		public final Y foo(Object o, J<Y, I<Y>> j) {\n" + 
11075
			"			return null;\n" + 
11076
			"		}\n" + 
11077
			"	public final void bar(Object o, J<Y, String> j, Y y) {\n" + 
11078
			"	}\n" + 
11079
			"}",
11080
			"I.java",
11081
			"public interface I<S> {\n" + 
11082
			"	public S foo(Object o, J<S, I<S>> j);\n" + 
11083
			"	public void bar(Object o, J<S, String> j, S s);\n" + 
11084
			"}",
11085
			"J.java",
11086
			"public interface J<S, T> {}"
11087
		},
11088
		"",
11089
		null,
11090
		true,
11091
		null,
11092
		compilerOptions15,
11093
		null);
11094
	
11095
	Map compilerOptions14 = getCompilerOptions();
11096
	compilerOptions14.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2);
11097
	compilerOptions14.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
11098
	compilerOptions14.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3);
11099
	this.runConformTest(
11100
		new String[] {
11101
			"X.java",
11102
			"public class X {\n" + 
11103
			"	public Object foo() {\n" + 
11104
			"		return new Y() {};\n" + 
11105
			"	}\n" + 
11106
			"}"
11107
		},
11108
		"",
11109
		null,
11110
		false,
11111
		null,
11112
		compilerOptions14,
11113
		null);
11114
}
11064
}
11115
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java (-10 / +15 lines)
Lines 3379-3430 Link Here
3379
				"	^^^^\n" +
3379
				"	^^^^\n" +
3380
				"The method bar1() from the type X refers to the missing type Zork\n" +
3380
				"The method bar1() from the type X refers to the missing type Zork\n" +
3381
				"----------\n" +
3381
				"----------\n" +
3382
				"2. ERROR in X.java (at line 6)\n" +
3382
				"2. ERROR in X.java (at line 5)\n" + 
3383
				"	bar2();\n" + 
3384
				"	^^^^\n" + 
3385
				"The method bar2() from the type X refers to the missing type Zork\n" + 
3386
				"----------\n" + 
3387
				"3. ERROR in X.java (at line 6)\n" +
3383
				"	bar3(null);\n" +
3388
				"	bar3(null);\n" +
3384
				"	^^^^\n" +
3389
				"	^^^^\n" +
3385
				"The method bar3(Zork) from the type X refers to the missing type Zork\n" +
3390
				"The method bar3(Zork) from the type X refers to the missing type Zork\n" +
3386
				"----------\n" +
3391
				"----------\n" +
3387
				"3. ERROR in X.java (at line 7)\n" +
3392
				"4. ERROR in X.java (at line 7)\n" +
3388
				"	bar4(null,null);\n" +
3393
				"	bar4(null,null);\n" +
3389
				"	^^^^\n" +
3394
				"	^^^^\n" +
3390
				"The method bar4(Zork) from the type X refers to the missing type Zork\n" +
3395
				"The method bar4(Zork) from the type X refers to the missing type Zork\n" +
3391
				"----------\n" +
3396
				"----------\n" +
3392
				"4. ERROR in X.java (at line 9)\n" +
3397
				"5. ERROR in X.java (at line 9)\n" +
3393
				"	Zork<String> bar1() {}\n" +
3398
				"	Zork<String> bar1() {}\n" +
3394
				"	^^^^\n" +
3399
				"	^^^^\n" +
3395
				"Zork cannot be resolved to a type\n" +
3400
				"Zork cannot be resolved to a type\n" +
3396
				"----------\n" +
3401
				"----------\n" +
3397
				"5. ERROR in X.java (at line 9)\n" +
3402
				"6. ERROR in X.java (at line 9)\n" +
3398
				"	Zork<String> bar1() {}\n" +
3403
				"	Zork<String> bar1() {}\n" +
3399
				"	     ^^^^^^\n" +
3404
				"	     ^^^^^^\n" +
3400
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3405
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3401
				"----------\n" +
3406
				"----------\n" +
3402
				"6. ERROR in X.java (at line 10)\n" +
3407
				"7. ERROR in X.java (at line 10)\n" +
3403
				"	List<Zork> bar2() {}\n" +
3408
				"	List<Zork> bar2() {}\n" +
3404
				"	     ^^^^\n" +
3409
				"	     ^^^^\n" +
3405
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3410
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3406
				"----------\n" +
3411
				"----------\n" +
3407
				"7. ERROR in X.java (at line 10)\n" +
3412
				"8. ERROR in X.java (at line 10)\n" +
3408
				"	List<Zork> bar2() {}\n" +
3413
				"	List<Zork> bar2() {}\n" +
3409
				"	     ^^^^\n" +
3414
				"	     ^^^^\n" +
3410
				"Zork cannot be resolved to a type\n" +
3415
				"Zork cannot be resolved to a type\n" +
3411
				"----------\n" +
3416
				"----------\n" +
3412
				"8. ERROR in X.java (at line 11)\n" +
3417
				"9. ERROR in X.java (at line 11)\n" +
3413
				"	void bar3(Zork<String> z) {}\n" +
3418
				"	void bar3(Zork<String> z) {}\n" +
3414
				"	          ^^^^\n" +
3419
				"	          ^^^^\n" +
3415
				"Zork cannot be resolved to a type\n" +
3420
				"Zork cannot be resolved to a type\n" +
3416
				"----------\n" +
3421
				"----------\n" +
3417
				"9. ERROR in X.java (at line 11)\n" +
3422
				"10. ERROR in X.java (at line 11)\n" +
3418
				"	void bar3(Zork<String> z) {}\n" +
3423
				"	void bar3(Zork<String> z) {}\n" +
3419
				"	               ^^^^^^\n" +
3424
				"	               ^^^^^^\n" +
3420
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3425
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3421
				"----------\n" +
3426
				"----------\n" +
3422
				"10. ERROR in X.java (at line 12)\n" +
3427
				"11. ERROR in X.java (at line 12)\n" +
3423
				"	void bar4(Zork<String,String> z) {}\n" +
3428
				"	void bar4(Zork<String,String> z) {}\n" +
3424
				"	          ^^^^\n" +
3429
				"	          ^^^^\n" +
3425
				"Zork cannot be resolved to a type\n" +
3430
				"Zork cannot be resolved to a type\n" +
3426
				"----------\n" +
3431
				"----------\n" +
3427
				"11. ERROR in X.java (at line 12)\n" +
3432
				"12. ERROR in X.java (at line 12)\n" +
3428
				"	void bar4(Zork<String,String> z) {}\n" +
3433
				"	void bar4(Zork<String,String> z) {}\n" +
3429
				"	               ^^^^^^^^^^^^^\n" +
3434
				"	               ^^^^^^^^^^^^^\n" +
3430
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
3435
				"Syntax error, parameterized types are only available if source level is 1.5\n" +
(-)src/org/eclipse/jdt/core/tests/model/CompletionTests.java (-2 / +2 lines)
Lines 6697-6704 Link Here
6697
	this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
6697
	this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
6698
6698
6699
	assertResults(
6699
	assertResults(
6700
			"CompletionInsideGenericClas[POTENTIAL_METHOD_DECLARATION]{CompletionInsideGenericClas, Ltest.CompletionInsideGenericClass;, ()V, CompletionInsideGenericClas, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" +
6700
			"CompletionInsideGenericClas[POTENTIAL_METHOD_DECLARATION]{CompletionInsideGenericClas, Ltest.CompletionInsideGenericClass<TCompletionInsideGenericClassParameter;>;, ()V, CompletionInsideGenericClas, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" +
6701
			"CompletionInsideGenericClass[TYPE_REF]{CompletionInsideGenericClass, test, Ltest.CompletionInsideGenericClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
6701
			"CompletionInsideGenericClass<CompletionInsideGenericClassParameter>[TYPE_REF]{CompletionInsideGenericClass, test, Ltest.CompletionInsideGenericClass<TCompletionInsideGenericClassParameter;>;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
6702
			requestor.getResults());
6702
			requestor.getResults());
6703
}
6703
}
6704
6704
(-)src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java (+269 lines)
Lines 4876-4879 Link Here
4876
			deleteProject(project15);
4876
			deleteProject(project15);
4877
	}
4877
	}
4878
}
4878
}
4879
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850
4880
public void testGenericAPIUsageFromA14Project6() throws CoreException {
4881
	IJavaProject project14 = null;
4882
	IJavaProject project15 = null;
4883
	try {
4884
		project15 = createJavaProject("Reconciler15API", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin");
4885
		createFolder("/Reconciler15API/src/p2");
4886
		createFile(
4887
				"/Reconciler15API/src/p2/Y.java",
4888
				"package p2;\n" +
4889
				"public abstract class Y implements I<Y> {\n" +
4890
				"    public final Y foo(Object o, J<Y> j) {\n" +
4891
				"        return null;\n" +
4892
				"    }\n" +
4893
				"    public final void bar(Object o, J<Y> j, Y y) {\n" +
4894
				"    }\n" +
4895
				"}\n" +
4896
				"interface I<S> {\n" +
4897
				"	public S foo(Object o, J<S> j);\n" +
4898
				"	public void bar(Object o, J<S> j, S s);\n" +
4899
				"}\n" +
4900
				"interface J<S> {}\n"
4901
			);
4902
		project15.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
4903
		project15.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
4904
		project15.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5);
4905
		
4906
		project14 = createJavaProject("Reconciler1415", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
4907
		project14.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
4908
		project14.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
4909
		project14.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
4910
		
4911
		IClasspathEntry[] oldClasspath = project14.getRawClasspath();
4912
		int oldLength = oldClasspath.length;
4913
		IClasspathEntry[] newClasspath = new IClasspathEntry[oldLength+1];
4914
		System.arraycopy(oldClasspath, 0, newClasspath, 0, oldLength);
4915
		newClasspath[oldLength] = JavaCore.newProjectEntry(new Path("/Reconciler15API"));
4916
		project14.setRawClasspath(newClasspath, null);
4917
		
4918
		createFolder("/Reconciler1415/src/p1");
4919
		String source = 
4920
			"package p1;\n" +
4921
			"import p2.Y;\n" +
4922
			"public class X {\n" + 
4923
			"   private int unused = 0;\n" +
4924
			"	public Object foo() {\n" + 
4925
			"		return new Y() {};\n" + 
4926
			"	}\n" + 
4927
			"}";
4928
4929
		createFile(
4930
			"/Reconciler1415/src/p1/X.java",
4931
			source
4932
		);
4933
		
4934
		this.workingCopies = new ICompilationUnit[1];
4935
		char[] sourceChars = source.toCharArray();
4936
		this.problemRequestor.initialize(sourceChars);
4937
		this.workingCopies[0] = getCompilationUnit("/Reconciler1415/src/p1/X.java").getWorkingCopy(this.wcOwner, null);
4938
		assertProblems(
4939
			"Unexpected problems",
4940
			"----------\n" + 
4941
			"1. WARNING in /Reconciler1415/src/p1/X.java (at line 4)\n" + 
4942
			"	private int unused = 0;\n" + 
4943
			"	            ^^^^^^\n" + 
4944
			"The field X.unused is never read locally\n" + 
4945
			"----------\n"
4946
		);
4947
	} finally {
4948
		if (project14 != null)
4949
			deleteProject(project14);
4950
		if (project15 != null)
4951
			deleteProject(project15);
4952
	}
4953
}
4954
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850
4955
public void testGenericAPIUsageFromA14Project7() throws CoreException, IOException {
4956
	IJavaProject project14 = null;
4957
	IJavaProject project15 = null;
4958
	try {
4959
		project15 = createJavaProject("Reconciler15API", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin");
4960
		createFolder("/Reconciler15API/src/p2");
4961
		createFile(
4962
				"/Reconciler15API/src/p2/Y.java",
4963
				"package p2;\n" +
4964
				"import java.util.List;\n" +
4965
				"public class Y<T> extends List<T> {\n" +
4966
				"    public static Y<String> getY() {\n" +
4967
				"        return new Y<String>();\n" +
4968
				"    }\n" +
4969
				"}\n"
4970
			);
4971
		project15.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
4972
		project15.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
4973
		project15.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5);
4974
		
4975
		addLibrary(
4976
				project15,
4977
				"libList15.jar",
4978
				"libList15src.zip",
4979
				new String[] {
4980
					"java/util/List.java",
4981
					"package java.util;\n" +
4982
					"public class List<T> {\n" +
4983
					"}"
4984
				},
4985
				JavaCore.VERSION_1_5
4986
			);
4987
4988
		project14 = createJavaProject("Reconciler1415", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
4989
		project14.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
4990
		project14.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
4991
		project14.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
4992
4993
		addLibrary(
4994
				project14,
4995
				"libList14.jar",
4996
				"libList14src.zip",
4997
				new String[] {
4998
					"java/util/List.java",
4999
					"package java.util;\n" +
5000
					"public class List {\n" +
5001
					"}"
5002
				},
5003
				JavaCore.VERSION_1_4
5004
			);
5005
5006
		IClasspathEntry[] oldClasspath = project14.getRawClasspath();
5007
		int oldLength = oldClasspath.length;
5008
		IClasspathEntry[] newClasspath = new IClasspathEntry[oldLength+1];
5009
		System.arraycopy(oldClasspath, 0, newClasspath, 0, oldLength);
5010
		newClasspath[oldLength] = JavaCore.newProjectEntry(new Path("/Reconciler15API"));
5011
		project14.setRawClasspath(newClasspath, null);
5012
		
5013
		createFolder("/Reconciler1415/src/p1");
5014
		String source = 
5015
			"package p1;\n" +
5016
			"import java.util.List;\n" +
5017
			"import p2.Y;\n" +
5018
			"public class X {\n" + 
5019
			"	private static List getList(boolean test) {\n" +
5020
			"	    if (test)\n" +
5021
			"	        return new Y();\n" + 
5022
			"	    else\n" +
5023
			"		    return Y.getY();\n" + 
5024
			"   }\n" + 
5025
			"}";
5026
5027
		createFile(
5028
			"/Reconciler1415/src/p1/X.java",
5029
			source
5030
		);
5031
		
5032
		this.workingCopies = new ICompilationUnit[1];
5033
		char[] sourceChars = source.toCharArray();
5034
		this.problemRequestor.initialize(sourceChars);
5035
		this.workingCopies[0] = getCompilationUnit("/Reconciler1415/src/p1/X.java").getWorkingCopy(this.wcOwner, null);
5036
		assertProblems(
5037
			"Unexpected problems",
5038
			"----------\n" + 
5039
			"1. WARNING in /Reconciler1415/src/p1/X.java (at line 5)\n" + 
5040
			"	private static List getList(boolean test) {\n" + 
5041
			"	                    ^^^^^^^^^^^^^^^^^^^^^\n" + 
5042
			"The method getList(boolean) from the type X is never used locally\n" + 
5043
			"----------\n"
5044
		);
5045
	} finally {
5046
		if (project14 != null)
5047
			deleteProject(project14);
5048
		if (project15 != null)
5049
			deleteProject(project15);
5050
	}
5051
}
5052
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850
5053
public void testGenericAPIUsageFromA14Project8() throws CoreException, IOException {
5054
	IJavaProject project14 = null;
5055
	IJavaProject project15 = null;
5056
	try {
5057
		project15 = createJavaProject("Reconciler15API", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin");
5058
		createFolder("/Reconciler15API/src/p2");
5059
		createFile(
5060
				"/Reconciler15API/src/p2/Y.java",
5061
				"package p2;\n" +
5062
				"public class Y<T> extends java.util.List<T> {\n" +
5063
				"    public static Y<String> getY() {\n" +
5064
				"        return new Y<String>();\n" +
5065
				"    }\n" +
5066
				"}\n"
5067
			);
5068
		project15.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
5069
		project15.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
5070
		project15.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5);
5071
		
5072
		addLibrary(
5073
				project15,
5074
				"libList15.jar",
5075
				"libList15src.zip",
5076
				new String[] {
5077
					"java/util/List.java",
5078
					"package java.util;\n" +
5079
					"public class List<T> {\n" +
5080
					"}"
5081
				},
5082
				JavaCore.VERSION_1_5
5083
			);
5084
5085
		project14 = createJavaProject("Reconciler1415", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin");
5086
		project14.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
5087
		project14.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
5088
		project14.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
5089
5090
		addLibrary(
5091
				project14,
5092
				"libList14.jar",
5093
				"libList14src.zip",
5094
				new String[] {
5095
					"java/util/List.java",
5096
					"package java.util;\n" +
5097
					"public class List {\n" +
5098
					"}"
5099
				},
5100
				JavaCore.VERSION_1_4
5101
			);
5102
5103
		IClasspathEntry[] oldClasspath = project14.getRawClasspath();
5104
		int oldLength = oldClasspath.length;
5105
		IClasspathEntry[] newClasspath = new IClasspathEntry[oldLength+1];
5106
		System.arraycopy(oldClasspath, 0, newClasspath, 0, oldLength);
5107
		newClasspath[oldLength] = JavaCore.newProjectEntry(new Path("/Reconciler15API"));
5108
		project14.setRawClasspath(newClasspath, null);
5109
		
5110
		createFolder("/Reconciler1415/src/p1");
5111
		String source = 
5112
			"package p1;\n" +
5113
			"import p2.Y;\n" +
5114
			"public class X {\n" + 
5115
			"	private static java.util.List getList(boolean test) {\n" +
5116
			"	    if (test)\n" +
5117
			"	        return new Y();\n" + 
5118
			"	    else\n" +
5119
			"		    return Y.getY();\n" + 
5120
			"   }\n" + 
5121
			"}";
5122
5123
		createFile(
5124
			"/Reconciler1415/src/p1/X.java",
5125
			source
5126
		);
5127
		
5128
		this.workingCopies = new ICompilationUnit[1];
5129
		char[] sourceChars = source.toCharArray();
5130
		this.problemRequestor.initialize(sourceChars);
5131
		this.workingCopies[0] = getCompilationUnit("/Reconciler1415/src/p1/X.java").getWorkingCopy(this.wcOwner, null);
5132
		assertProblems(
5133
			"Unexpected problems",
5134
			"----------\n" + 
5135
			"1. WARNING in /Reconciler1415/src/p1/X.java (at line 4)\n" + 
5136
			"	private static java.util.List getList(boolean test) {\n" + 
5137
			"	                              ^^^^^^^^^^^^^^^^^^^^^\n" + 
5138
			"The method getList(boolean) from the type X is never used locally\n" + 
5139
			"----------\n"
5140
		);
5141
	} finally {
5142
		if (project14 != null)
5143
			deleteProject(project14);
5144
		if (project15 != null)
5145
			deleteProject(project15);
5146
	}
5147
}
4879
}
5148
}

Return to bug 324850