Files
mgmt/lang/interpret_test/TestAstFunc2/fortytwoerror.txtar
James Shubin 58461323b9 lang: parser: Try to add the end values in parser
Not sure if this is right, but it's a start.
2025-06-06 03:11:06 -04:00

19 lines
309 B
Plaintext

-- main.mcl --
import "fmt"
import "math"
# This should fail since it can't be polymorphic!
$myfortytwo = func() {
math.fortytwo()
}
$a = $myfortytwo() + 4
$b = $myfortytwo() + 3.0
test ["x",] {
int8 => $a,
float32 => $b,
}
-- OUTPUT --
# err: errUnify: type error: int != float: /main.mcl @ 10:6-10:25