Skip to content

Bug: ClsCatch in case expressions #101

@yoshihiro503

Description

@yoshihiro503

The clauses in case expressions must be ClsCase, but not.

For example:

main(X) ->
    case X of
        {abc, Foo, Bar} -> ok
    end.

Current obeam (0.1.5) treats the clause in this code as an ClsCatch.

(ClsCatch (line 7) (line_cls 7) (line_stacktrace 7)
 (exception_class (AtomVarAtom (line 7) (atom abc)))
 (pattern (PatVar (line 7) (id Foo))) (stacktrace Bar) (guard_sequence ())
 (body (ExprBody (exprs ((ExprLit (lit (LitAtom (line 7) (atom ok)))))))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions