Closed phenax closed 1 year ago
Nice! Thanks for the report. The type inference is a work in progress at the moment - but this one should be an easy fix.
I also think the examples should not compile due to mismatch number of arguments in signature and definition.
This is an error now:
Expected `string` but got `number` in the body of the function:
fn: number -> string
fn x =
let
y: number
y = 0
in
y
Mismatching number of arguments in signature vs definition is kinda intended currently
I was experimenting with the language on the playground and tested out the following code
Expected
Observed
Results in the following code which is invalid.
The value given to y doesn't matter since it seems to be completely ignored.