[fine] Here are some tests

This commit is contained in:
John Doty 2024-02-05 06:13:32 -08:00
parent ac3c158a81
commit 3415b1a3f6
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,6 @@
fun test() {
while 12 {}
}
// @expect-errors:
// | 2:8: the condition of the while loop must produce a boolean

View file

@ -0,0 +1,12 @@
fun test() -> f64 {
let result = 1;
let i = 0;
while i < 10 {
result = result * 2;
i = i + 1;
}
result
}
// @no-errors
// @eval: Float(1024.0)