Skip to content

MAP is always falsy #78

@python-processing-unit

Description

@python-processing-unit

According to the specification section 4.5.3:

When a MAP is used in a boolean context, a MAP MUST be treated as 1 if it contains any key-value pairs, MUST be treated as 0 otherwise.

In the implementation, however, MAP is always falsy.

Prefix REPL. Enter statements, blank line to run buffer.
>>> PRINT(BOOL(<>))
0b0
>>> PRINT(BOOL(<"foo" = 0b1>))
0b0
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions