diff --git a/Upsilon/Binder/Binder.cs b/Upsilon/Binder/Binder.cs index 0c527c1..dc408c5 100644 --- a/Upsilon/Binder/Binder.cs +++ b/Upsilon/Binder/Binder.cs @@ -224,6 +224,8 @@ namespace Upsilon.Binder private VariableSymbol TryBindVariable(string name, bool isLocal, BoundExpression assignment) { + if (name == "_") + return null; if (!Scope.TryGetVariable(name, !isLocal, out var variable)) { if (assignment.Type == Type.Table) diff --git a/Upsilon/Evaluator/Evaluator.cs b/Upsilon/Evaluator/Evaluator.cs index c087a50..04c6a17 100644 --- a/Upsilon/Evaluator/Evaluator.cs +++ b/Upsilon/Evaluator/Evaluator.cs @@ -290,6 +290,8 @@ namespace Upsilon.Evaluator var variableSymbol = e.Variables[i]; if (variableSymbol == null) continue; + if (variableSymbol.Name == "_") + continue; var value = table.Get(_diagnostics, e.Span, new NumberLong(i + 1), Scope); if (variableSymbol.Local) Scope.Set(variableSymbol, value);