mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
pkg/eval: Remove reference to the now-gone local: scope.
This commit is contained in:
parent
8c9414a0ec
commit
d7a9d38731
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user