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
It's possible to mistakenly interpolate value into Amber string the following way: "\$variable". This shouldn't be allowed as it creates a lot of potential issues.
To Reproduce
This snippet will interpolate not only the variable name, but also the value that it contains:
amber -e 'let var = 42; echo "\${nameof var}"';
It happens because with interpolation we evaluate this amber code to this bash output:
var=42
echo"$var"
And then it returns 42
Expected behavior
The example written above should compile to:
var=42
echo"\$var"
And return $var as it should
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Describe the bug
It's possible to mistakenly interpolate value into Amber string the following way:
"\$variable"
. This shouldn't be allowed as it creates a lot of potential issues.To Reproduce
This snippet will interpolate not only the variable name, but also the value that it contains:
It happens because with interpolation we evaluate this amber code to this bash output:
And then it returns
42
Expected behavior
The example written above should compile to:
And return
$var
as it shouldAdditional context
N/A
The text was updated successfully, but these errors were encountered: