aussieplusplus icon indicating copy to clipboard operation
aussieplusplus copied to clipboard

Strange pattern-matching error

Open bbrk24 opened this issue 2 years ago • 0 comments

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'

bbrk24 avatar Mar 19 '22 02:03 bbrk24