Skip to content

Strange pattern-matching error #39

@bbrk24

Description

@bbrk24

This program:

G'DAY MATE!

YA RECKON x IS A <
    y ~ BAIL NAH, YEAH!;
    z ~ GIMME z;
>

CHEERS C***!

Gives the expected errors:

[line 5] TOO MANY DEFAULT BRANCHES IN MATCH STATEMENT, YA DAFT BUGGER
[line 6] EXPECTED NUMBER, STRING, BOOLEAN, NIL, OR IDENTIFIER BUT GOT '>'

However, if you change it from z to other:

G'DAY MATE!

YA RECKON x IS A <
    y ~ BAIL NAH, YEAH!;
    other ~ GIMME other;
>

CHEERS C***!

It now gives a much more confusing error message:

[line 8] OI MATE! EXPECTED [Number(420.0), String("any string literal"), True, False, BuggerAll, Ident("any identifier")] BUT GOT 'EOF'

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