-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Incorrect Boolean Casting #398
Comments
Possible workaround by running the condition in a bash command like |
Probably we need a better conversion for this type internally. PS: Amber when execute the code compiles it and run a bash process so it is the same. |
Is it a valid cast though? The cast from
|
I agree that |
Describe the bug
When casting a string value "true" to a boolean, the resulting boolean value matches the incorrect if condition. This issue occurs both when executing the script directly and when compiling it to bash. Amber version: amber 0.3.4-alpha
To Reproduce
Script:
Execution:
Compiled to bash:
Expected behavior
The output should be:
Additional context
The issue seems to be related to the incorrect casting of string values to boolean. The string "true" is casted to a boolean but matches the false condition.
The text was updated successfully, but these errors were encountered: