pschachte / wybe

A programming language supporting most of both declarative and imperative programming
MIT License
47 stars 6 forks source link

Discrepancy between `WYBE.md` and the compiler in case expressions #433

Closed wnats closed 10 months ago

wnats commented 10 months ago

In WYBE.md, it is mentioned that https://github.com/pschachte/wybe/blob/29ae3cbf675fde812066477da17ca45c3a277ad6/WYBE.md?plain=1#L1158

However, the following compiles without an error:

def {noinline} one:int = 1
def {noinline} two:int = 2

!println(
    case one <=> two in {
        lesser ::
            "less"
    |   equal ::
            "equal"
    |   greater ::
            "greater"
    }
)

Also the error in the case expression example is illegal: https://github.com/pschachte/wybe/blob/29ae3cbf675fde812066477da17ca45c3a277ad6/WYBE.md?plain=1#L1169-L1176