mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 03:45:35 +02:00
Fix for ClassCastException (bug 233284).
This commit is contained in:
parent
5297afa058
commit
63089ab4e0
1 changed files with 6 additions and 3 deletions
|
@ -1997,13 +1997,16 @@ public class CPPVisitor {
|
||||||
ICPPFunctionType functionType = (ICPPFunctionType) type;
|
ICPPFunctionType functionType = (ICPPFunctionType) type;
|
||||||
IPointerType thisType = functionType.getThisType();
|
IPointerType thisType = functionType.getThisType();
|
||||||
if (thisType != null) {
|
if (thisType != null) {
|
||||||
ICPPClassType classType;
|
IType nestedType;
|
||||||
try {
|
try {
|
||||||
classType = (ICPPClassType) thisType.getType();
|
nestedType = thisType.getType();
|
||||||
|
while (nestedType instanceof ITypeContainer) {
|
||||||
|
nestedType = ((ITypeContainer) nestedType).getType();
|
||||||
|
}
|
||||||
} catch (DOMException e) {
|
} catch (DOMException e) {
|
||||||
return e.getProblem();
|
return e.getProblem();
|
||||||
}
|
}
|
||||||
return new CPPPointerToMemberType(type, classType,
|
return new CPPPointerToMemberType(type, (ICPPClassType) nestedType,
|
||||||
thisType.isConst(), thisType.isVolatile());
|
thisType.isConst(), thisType.isVolatile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue