Skip to content

Commit 3a373c5

Browse files
committed
fix the type of the getImplements() predicate, to fix the parent-child relation in the AST
1 parent 2329525 commit 3a373c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,9 @@ class Module extends TModule, ModuleDeclaration {
743743
}
744744

745745
/** Gets a ref to the module that this module implements. */
746-
TypeExpr getImplements(int i) { toQL(result) = mod.getImplements(i).getTypeExpr() }
746+
TypeRef getImplements(int i) {
747+
exists(SignatureExpr sig | sig.toQL() = mod.getImplements(i) | result = sig.asType())
748+
}
747749

748750
/** Gets the module expression that this module is an alias for, if any. */
749751
ModuleExpr getAlias() { toQL(result) = mod.getAFieldOrChild().(QL::ModuleAliasBody).getChild() }

0 commit comments

Comments
 (0)