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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java (-15 / +16 lines)
Lines 65-87 Link Here
65
		
65
		
66
		// declaring method or type
66
		// declaring method or type
67
		BlockScope scope = this.declaringScope;
67
		BlockScope scope = this.declaringScope;
68
		MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope();
68
		if (scope != null) {
69
		ReferenceContext referenceContext = methodScope.referenceContext;
69
			MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope();
70
		if (referenceContext instanceof AbstractMethodDeclaration) {
70
			ReferenceContext referenceContext = methodScope.referenceContext;
71
			MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding;
71
			if (referenceContext instanceof AbstractMethodDeclaration) {
72
			if (methodBinding != null) {
72
				MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding;
73
				buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/));
73
				if (methodBinding != null) {
74
			}
74
					buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/));
75
		} else if (referenceContext instanceof TypeDeclaration) {
75
				}
76
			TypeBinding typeBinding = ((TypeDeclaration) referenceContext).binding;
76
			} else if (referenceContext instanceof TypeDeclaration) {
77
			if (typeBinding != null) {
77
				TypeBinding typeBinding = ((TypeDeclaration) referenceContext).binding;
78
				buffer.append(typeBinding.computeUniqueKey(false/*not a leaf*/));
78
				if (typeBinding != null) {
79
					buffer.append(typeBinding.computeUniqueKey(false/*not a leaf*/));
80
				}
79
			}
81
			}
82
	
83
			// scope index
84
			getScopeKey(scope, buffer);
80
		}
85
		}
81
82
		// scope index
83
		getScopeKey(scope, buffer);
84
85
		// variable name
86
		// variable name
86
		buffer.append('#');
87
		buffer.append('#');
87
		buffer.append(this.name);
88
		buffer.append(this.name);

Return to bug 185129