Fix panic when assigning value to $env (#7894)

This commit is contained in:
Jakub Žádník
2023-01-28 21:17:32 +02:00
committed by GitHub
parent 3c6b10c6b2
commit 2a39332d51
3 changed files with 25 additions and 0 deletions

View File

@ -371,3 +371,8 @@ fn range_right_exclusive() -> TestResult {
fn assignment_to_in_var_no_panic() -> TestResult {
fail_test(r#"$in = 3"#, "needs to be a mutable variable")
}
#[test]
fn assignment_to_env_no_panic() -> TestResult {
fail_test(r#"$env = 3"#, "cannot_replace_env")
}