You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If one uses variables inside an interpolated expression in the middle of a string, this causes an unexpected "unbound identifier" error. As often with these errors, an environment is probably getting dropped somewhere where it shouldn't.
To Reproduce
Use a variable as an interpolated expression somewhere in the middle of a string:
$nickel <<< '
let world = "world" in
"Hello, ${world}!"
'
error: Unbound identifier
┌─ <stdin>:3:11
│
3 │ "Hello, ${world}!"
│ ^^^^^ this identifier is unbound
Note that the error is not triggered if the variable is alone in the string:
$nickel <<< 'let x = "a" in "${x}"'
Done: Str("a")
Expected behavior
Variables in scope should be accessible in interpolated string. The first example should succeed with result "Hello, world!".
The text was updated successfully, but these errors were encountered:
Describe the bug
If one uses variables inside an interpolated expression in the middle of a string, this causes an unexpected "unbound identifier" error. As often with these errors, an environment is probably getting dropped somewhere where it shouldn't.
To Reproduce
Use a variable as an interpolated expression somewhere in the middle of a string:
Note that the error is not triggered if the variable is alone in the string:
Expected behavior
Variables in scope should be accessible in interpolated string. The first example should succeed with result
"Hello, world!"
.The text was updated successfully, but these errors were encountered: