Skip to content
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

language spec indicates numbers can NOT be converted to bools #38

Open
mjkkirschner opened this issue Feb 11, 2020 · 0 comments
Open

language spec indicates numbers can NOT be converted to bools #38

mjkkirschner opened this issue Feb 11, 2020 · 0 comments

Comments

@mjkkirschner
Copy link
Member

From To var number bool string FFI type
var yes no no no no
number yes yes no no no
bool yes no yes no no
string yes no no yes no
FFI type yes no no no Covariant

but later it says:

Logical operators
&&, ||, !
The operand should be bool type; otherwise type conversion will be incurred.

I am curious if numbers, empty strings, or null should be evaluated as falsey or truthy where bools are expected - ie logical operators, and conditional expressions, or if statements....
@aparajit-pratap you filed a few tasks related to this and I am looking for where this is specified - if it's not specified, let's specify it. @gregmarr @pinzart - what does thunderstorm do?

@mjkkirschner mjkkirschner changed the title language spec indicates numbers can NOT be coalesced to bools language spec indicates numbers can NOT be converted to bools Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant