Skip to content

Whitespaced block inconsistencies #2

@wcjohnson

Description

@wcjohnson

Input Code

if a: {x} else b
y = if a: {x} else b

Current Behavior

if (a) {
  x;
} else b;
Parsing error: Unexpected token, expected :

Expected Behavior

There should be consistency in whether this is legal syntax or not.

Resolution

Mixing {} and single-statement blocks should be legal as it is in JS. Mixing whiteblocks with any other type of blocks should be illegal.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions