nodes: add missing reader tracking to function calls

This commit is contained in:
Antoine Viallon 2024-01-05 23:41:41 +01:00
parent 714c9b490e
commit cd42fac98e
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -355,7 +355,7 @@ class Call(Node):
def semantic_analysis(self, context: semantic.Context):
super(Call, self).semantic_analysis(context)
variable = context.get_variable(self.identifier.value)
variable = context.get_variable(self.identifier.value, reader=self)
if variable is None:
raise SemanticAnalysisError(location=self.location(), message=f"Unknown function '{self.identifier.value}'")