Python: Fix ModuleVariableNode.toString

In some cases mod.getName() does not have a result, so toString of
ModuleVariableNode would also not have a result, which would cause
data-flow paths that use these as an edge to not be valid :O
This commit is contained in:
Rasmus Wriedt Larsen
2023-04-26 16:03:21 +02:00
parent bc08d67f19
commit 0c4bcec39e

View File

@@ -407,7 +407,7 @@ class ModuleVariableNode extends Node, TModuleVariableNode {
override Scope getScope() { result = mod }
override string toString() {
result = "ModuleVariableNode for " + mod.getName() + "." + var.getId()
result = "ModuleVariableNode in " + mod.toString() + " for " + var.getId()
}
/** Gets the module in which this variable appears. */