- if specobject and mclass.name != "Object" and objectclass != null and mclassdef.is_intro then
- supertypes.add objectclass.mclass_type
+
+ if mclassdef.is_intro and objectclass != null then
+ if mclass.kind == extern_kind and mclass.name != "Pointer" then
+ # it is an extern class, but not a Pointer
+ if specpointer then supertypes.add pointerclass.mclass_type
+ else if specobject and mclass.name != "Object" then
+ # it is a standard class without super class (but is not Object)
+ supertypes.add objectclass.mclass_type
+ end