diff --git a/compiler/semantic.py b/compiler/semantic.py index db0ccbe..4135cc4 100644 --- a/compiler/semantic.py +++ b/compiler/semantic.py @@ -229,8 +229,8 @@ class Context: # Check for unused variables if len(variable.reads) == 0 and variable.definition is not None: - raise SemanticAnalysisError(variable.definition.location(), - message=f"Variable '{variable.name}' is unused") + CompilationWarning(variable.definition.location(), + message=f"Variable '{variable.name}' is unused").raise_warning() for context in self.child_contexts.values(): context.check()