mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +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;
|
||||
IPointerType thisType = functionType.getThisType();
|
||||
if (thisType != null) {
|
||||
ICPPClassType classType;
|
||||
IType nestedType;
|
||||
try {
|
||||
classType = (ICPPClassType) thisType.getType();
|
||||
nestedType = thisType.getType();
|
||||
while (nestedType instanceof ITypeContainer) {
|
||||
nestedType = ((ITypeContainer) nestedType).getType();
|
||||
}
|
||||
} catch (DOMException e) {
|
||||
return e.getProblem();
|
||||
}
|
||||
return new CPPPointerToMemberType(type, classType,
|
||||
return new CPPPointerToMemberType(type, (ICPPClassType) nestedType,
|
||||
thisType.isConst(), thisType.isVolatile());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue