Skip to content

Bring variable into scope if bound on all branches #21

@nachivpn

Description

@nachivpn

Currently, this program is rejected although it is semantically valid:

x() -> 
    if
      true -> X = 1;
      false -> X = 3
    end,
    X.    %%line 24

with error:

test.erl: error in parse transform 'etc': {"Type Error: 'X' not bound on line 24

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions