mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix Not implemented error in PDOMClassType.isSameType().
This commit is contained in:
parent
f8dbea309b
commit
c8a56d7cb3
1 changed files with 17 additions and 3 deletions
|
@ -44,6 +44,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
import org.eclipse.cdt.internal.core.Util;
|
||||||
import org.eclipse.cdt.internal.core.dom.bid.ILocalBindingIdentity;
|
import org.eclipse.cdt.internal.core.dom.bid.ILocalBindingIdentity;
|
||||||
|
import org.eclipse.cdt.internal.core.index.IIndexProxyBinding;
|
||||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||||
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList;
|
||||||
import org.eclipse.cdt.internal.core.pdom.dom.FindBindingByLinkageConstant;
|
import org.eclipse.cdt.internal.core.pdom.dom.FindBindingByLinkageConstant;
|
||||||
|
@ -119,10 +120,23 @@ ICPPClassScope, IPDOMMemberOwner {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSameType(IType type) {
|
public boolean isSameType(IType type) {
|
||||||
if (type instanceof PDOMBinding)
|
if (type instanceof PDOMBinding) {
|
||||||
return record == ((PDOMBinding)type).getRecord();
|
return record == ((PDOMBinding)type).getRecord();
|
||||||
else
|
} else if (type instanceof ICPPClassType) {
|
||||||
throw new PDOMNotImplementedError();
|
try {
|
||||||
|
IIndexProxyBinding pdomType = pdom.adaptBinding((ICPPClassType)type);
|
||||||
|
if (pdomType == null)
|
||||||
|
return false;
|
||||||
|
else if (pdomType instanceof PDOMBinding)
|
||||||
|
return record == ((PDOMBinding)pdomType).getRecord();
|
||||||
|
else
|
||||||
|
throw new PDOMNotImplementedError();
|
||||||
|
} catch (CoreException e) {
|
||||||
|
CCorePlugin.log(e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICPPBase[] getBases() throws DOMException {
|
public ICPPBase[] getBases() throws DOMException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue