Skip to content

Commit db6551c

Browse files
authored
QL: Fix up getASuperType
I'm not sure if it's correct to include also the `instanceof`s, but we can always fix this later.
1 parent 4694ab4 commit db6551c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ql/src/codeql_ql/ast/Ast.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ class Class extends TClass, TypeDeclaration, ModuleDeclaration {
665665
/**
666666
* Gets a super-type referenced in the `extends` part of the class declaration.
667667
*/
668-
TypeExpr getASuperType() { toGenerated(result) = cls.getChild(_) }
668+
TypeExpr getASuperType() { toGenerated(result) in [cls.getExtends(_), cls.getInstanceof(_)] }
669669

670670
/** Gets the type that this class is defined to be an alias of. */
671671
TypeExpr getAliasType() {

0 commit comments

Comments
 (0)