h3rald / min

A small but practical concatenative programming language and shell
https://min-lang.org
MIT License
309 stars 23 forks source link

bug - expectation error #118

Closed ghost closed 3 years ago

ghost commented 3 years ago

Trying this:

( symbol bug
    (int :x string :y ==>)
    (x puts! y puts!)
) ::

?bug
1 2 bug

Results as:

=== bug [symbol]
(int :x string :y ==>)
(!) yolo.min(12,7) [bug]: Incorrect values found on the stack:
- expected: string int bug
- got:      int bug
    yolo.min(12,7) in symbol: bug

Problem is that parameter ordering of error is wrong: Must be expected: int string bug not expected: string int bug

h3rald commented 3 years ago

Ok, so the expectation check works, but in case of an error the order is reversed, right?

ghost commented 3 years ago

Ok, so the expectation check works, but in case of an error the order is reversed, right?

Yep..

h3rald commented 3 years ago

Fixed in v0.31.0.