Skip to content

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

@mjkkirschner

Description

@mjkkirschner
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions