add edge from root type MkHasUnderlyingType

This commit is contained in:
Erik Krogh Kristensen
2021-03-18 11:04:08 +01:00
parent 40ec23cf13
commit 8b931626ce
3 changed files with 17 additions and 0 deletions

View File

@@ -386,6 +386,8 @@ module API {
imports(_, m)
or
m = any(CanonicalName n | isUsed(n)).getExternalModuleName()
or
any(TypeAnnotation n).hasQualifiedName(m, _)
} or
MkClassInstance(DataFlow::ClassNode cls) { cls = trackDefNode(_) and hasSemantics(cls) } or
MkAsyncFuncResult(DataFlow::FunctionNode f) {
@@ -902,6 +904,12 @@ module API {
succ in [mkCanonicalNameDef(cn2), mkCanonicalNameUse(cn2)]
)
or
exists(string moduleName, string exportName |
pred = MkModuleImport(moduleName) and
lbl = Label::member(exportName) and
succ = MkHasUnderlyingType(moduleName, exportName)
)
or
exists(DataFlow::Node nd, DataFlow::FunctionNode f |
pred = MkDef(nd) and
f = trackDefNode(nd) and