mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 03:53:21 +02:00
check type run-time IType expected type against IType type (rather than IScope type)
This commit is contained in:
parent
b2114ce639
commit
203912cf44
1 changed files with 2 additions and 3 deletions
|
@ -31,7 +31,6 @@ import org.eclipse.cdt.core.dom.ast.ICompositeType;
|
||||||
import org.eclipse.cdt.core.dom.ast.IEnumeration;
|
import org.eclipse.cdt.core.dom.ast.IEnumeration;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||||
import org.eclipse.cdt.core.dom.ast.c.ICCompositeTypeScope;
|
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
|
||||||
import org.eclipse.cdt.core.index.IIndex;
|
import org.eclipse.cdt.core.index.IIndex;
|
||||||
|
@ -413,7 +412,7 @@ public class IndexBugsTests extends BaseTestCase {
|
||||||
assertEquals(2, bindings.length);
|
assertEquals(2, bindings.length);
|
||||||
|
|
||||||
IBinding struct, typedef;
|
IBinding struct, typedef;
|
||||||
if (bindings[0] instanceof ICCompositeTypeScope) {
|
if (bindings[0] instanceof ICompositeType) {
|
||||||
struct= bindings[0];
|
struct= bindings[0];
|
||||||
typedef= bindings[1];
|
typedef= bindings[1];
|
||||||
}
|
}
|
||||||
|
@ -424,7 +423,7 @@ public class IndexBugsTests extends BaseTestCase {
|
||||||
|
|
||||||
assertTrue(struct instanceof ICompositeType);
|
assertTrue(struct instanceof ICompositeType);
|
||||||
assertTrue(typedef instanceof ITypedef);
|
assertTrue(typedef instanceof ITypedef);
|
||||||
assertTrue(((ITypedef) typedef).getType() instanceof ICCompositeTypeScope);
|
assertTrue(((ITypedef) typedef).getType() instanceof ICompositeType);
|
||||||
assertTrue(((ITypedef) typedef).isSameType((ICompositeType) struct));
|
assertTrue(((ITypedef) typedef).isSameType((ICompositeType) struct));
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
Loading…
Add table
Reference in a new issue