diff --git a/pkg/eval/builtin_special.go b/pkg/eval/builtin_special.go index c493b9bb..08b9b2c3 100644 --- a/pkg/eval/builtin_special.go +++ b/pkg/eval/builtin_special.go @@ -150,7 +150,7 @@ func compileDel(cp *compiler, fn *parse.Form) effectOp { f = delLocalVarOp{ref.index} cp.thisScope().infos[ref.index].deleted = true } else { - cp.errorpf(cn, "only variables in local: or E: can be deleted") + cp.errorpf(cn, "only variables in the local scope or E: can be deleted") continue } } else { diff --git a/pkg/eval/builtin_special_test.go b/pkg/eval/builtin_special_test.go index fdab0ce4..cbf06d43 100644 --- a/pkg/eval/builtin_special_test.go +++ b/pkg/eval/builtin_special_test.go @@ -189,8 +189,6 @@ func TestDel(t *testing.T) { // Deleting variable That("var x = 1; del x").DoesNothing(), That("var x = 1; del x; echo $x").DoesNotCompile(), - That("var x = 1; del :x; echo $x").DoesNotCompile(), - That("var x = 1; del local:x; echo $x").DoesNotCompile(), // Deleting environment variable That("has-env TEST_ENV", "del E:TEST_ENV", "has-env TEST_ENV").Puts(true, false), // Deleting variable whose name contains special characters