1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 356239 - ClassCastException in ClassTypeHelper.getOwnMethods.

This commit is contained in:
Sergey Prigogin 2011-09-08 13:25:22 -07:00
parent 42eaf65363
commit d93f3d3532

View file

@ -314,11 +314,10 @@ public class ClassTypeHelper {
private static ObjectSet<ICPPMethod> getOwnMethods(ICPPClassType classType) { private static ObjectSet<ICPPMethod> getOwnMethods(ICPPClassType classType) {
ObjectSet<ICPPMethod> set= new ObjectSet<ICPPMethod>(4); ObjectSet<ICPPMethod> set= new ObjectSet<ICPPMethod>(4);
set.addAll(classType.getDeclaredMethods()); set.addAll(classType.getDeclaredMethods());
if (classType instanceof IProblemBinding) { IScope scope = classType.getCompositeScope();
return set; if (scope instanceof ICPPClassScope) {
set.addAll(((ICPPClassScope) scope).getImplicitMethods());
} }
ICPPClassScope scope= (ICPPClassScope) classType.getCompositeScope();
set.addAll(scope.getImplicitMethods());
return set; return set;
} }