Hiding of environment variables (#362)

* Remember environment variables from previous scope

* Re-introduce env var hiding

Right now, hiding decls is broken

* Re-introduce hidden field of import patterns

All tests pass now.

* Remove/Address tests TODOs

* Fix test typo; Report hiding error

* Add a few more tests

* Fix wrong expected test result
This commit is contained in:
Jakub Žádník
2021-11-30 08:14:05 +02:00
committed by GitHub
parent 21ddfc61f4
commit c17e1473db
9 changed files with 232 additions and 56 deletions

View File

@ -163,10 +163,10 @@ fn with_env(
for (k, v) in env {
match v {
EnvVar::Nothing => {
stack.env_vars.remove(&k);
stack.remove_env_var(&k);
}
EnvVar::Proper(s) => {
stack.env_vars.insert(k, s);
stack.add_env_var(k, s);
}
}
}