1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Correct getCompositeScope() for index bindings, bug 257818.

This commit is contained in:
Markus Schorn 2008-12-09 17:39:44 +00:00
parent ff783be167
commit 2bfba6efb0
2 changed files with 7 additions and 3 deletions

View file

@ -11,7 +11,6 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core.index.composite.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IType;
@ -57,7 +56,12 @@ public class CompositeCPPDeferredClassInstance extends CompositeCPPClassType imp
return ((ICPPDeferredClassInstance) rbinding).getUnknownName();
}
public ICPPScope asScope() throws DOMException {
@Override
public ICPPScope getCompositeScope() {
return asScope();
}
public ICPPScope asScope() {
if (unknownScope == null) {
unknownScope= new CompositeCPPUnknownScope(this, getUnknownName());
}

View file

@ -80,7 +80,7 @@ class PDOMCPPDeferredClassInstance extends PDOMCPPSpecialization implements ICPP
}
public IScope getCompositeScope() throws DOMException {
return ((ICPPClassType) getSpecializedBinding()).getCompositeScope();
return asScope();
}
public boolean isSameType(IType type) {