Fix up getASuperType

I'm not sure if it's correct to include also the `instanceof`s, but we
can always fix this later.
This commit is contained in:
Taus
2021-10-12 19:28:13 +00:00
committed by GitHub
parent d436be7e96
commit 8c6d139d67

View File

@@ -665,7 +665,7 @@ class Class extends TClass, TypeDeclaration, ModuleDeclaration {
/**
* Gets a super-type referenced in the `extends` part of the class declaration.
*/
TypeExpr getASuperType() { toGenerated(result) = cls.getChild(_) }
TypeExpr getASuperType() { toGenerated(result) in [cls.getExtends(_), cls.getInstanceof(_)] }
/** Gets the type that this class is defined to be an alias of. */
TypeExpr getAliasType() {