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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java (-3 / +7 lines)
Lines 2254-2262 Link Here
2254
					case METHOD_SCOPE :
2254
					case METHOD_SCOPE :
2255
						MethodScope methodScope = (MethodScope) scope;
2255
						MethodScope methodScope = (MethodScope) scope;
2256
						AbstractMethodDeclaration methodDecl = methodScope.referenceMethod();
2256
						AbstractMethodDeclaration methodDecl = methodScope.referenceMethod();
2257
						if (methodDecl != null && methodDecl.binding != null) {
2257
						if (methodDecl != null) {
2258
							TypeVariableBinding typeVariable = methodDecl.binding.getTypeVariable(name);
2258
							// use the methodDecl's typeParameters to handle problem cases when the method binding doesn't exist
2259
							if (typeVariable != null)	return typeVariable;
2259
							TypeParameter[] params = methodDecl.typeParameters();
2260
							for (int i = params == null ? 0 : params.length; --i >= 0;)
2261
								if (CharOperation.equals(params[i].name, name))
2262
									if (params[i].binding != null && params[i].binding.isValidBinding())
2263
										return params[i].binding;
2260
						}
2264
						}
2261
						insideStaticContext |= methodScope.isStatic;
2265
						insideStaticContext |= methodScope.isStatic;
2262
						insideTypeAnnotation = methodScope.insideTypeAnnotation;
2266
						insideTypeAnnotation = methodScope.insideTypeAnnotation;

Return to bug 204534