[fine] Gobs of work

- Assertion improvements
- Type check function calls
- Functions in the environment
- Compile function calls
This commit is contained in:
John Doty 2024-01-13 08:12:39 -08:00
parent 9d226b205d
commit 5ebede4a21
6 changed files with 539 additions and 142 deletions

View file

@ -0,0 +1,6 @@
fun foo(x: f64) {}
x;
// @type-error: 19 cannot find value x here
// Used to have a bug where statements after a function declaration would
// bind to the declaration's arguments, whoops.

View file

@ -0,0 +1,5 @@
fun foo(x: f64) {}
let x = foo("hello");
x;
// @type-error: 41 parameter 0 has an incompatible type: expected f64 but got string