Allow erasing vars via function-scope

This triggered an assert because the remove code had no idea how to
find the function scope.

Oops!
This commit is contained in:
Fabian Homborg
2021-08-04 17:54:58 +02:00
parent c7c67755d3
commit 0059192f61
2 changed files with 21 additions and 0 deletions

View File

@@ -806,3 +806,17 @@ end
test-function-scope
echo $funcvar $funcvar2
# CHECK:
function erase-funcvar
set -l banana 1
begin
set -l banana 2
set -ef banana
echo $banana
# CHECK: 2
end
echo $banana
# CHECK:
end
erase-funcvar