diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-18 11:59:05 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-18 11:59:05 +0200 |
| commit | bca035172c463e6ac4aaf2591d7d4af2da51c522 (patch) | |
| tree | d17ba4c0208caab1d30f6f2d19821cbd203e37fa /tests/typ/code/while.typ | |
| parent | 8b6391040e3fb2ab5f739e26f88621d63ad5d3cc (diff) | |
Join semantics
Diffstat (limited to 'tests/typ/code/while.typ')
| -rw-r--r-- | tests/typ/code/while.typ | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/typ/code/while.typ b/tests/typ/code/while.typ index e55f8f10..306c1e45 100644 --- a/tests/typ/code/while.typ +++ b/tests/typ/code/while.typ @@ -23,8 +23,10 @@ // Value of while loops. // Ref: false -#test(type(while false {}), "template") -#test(type(while false []), "template") +#test(while false {}, none) + +#let i = 0 +#test(type(while i < 1 [{ i += 1 }]), "template") --- // Ref: false @@ -37,13 +39,13 @@ // Error: 8-15 unknown variable #while nothing {} -// A single error stops iteration. +// Errors taint everything. #let i = 0 #test(error, while i < 10 { i += 1 if i < 5 [nope] else { error } }) -#test(i, 5) +#test(i, 10) --- // Error: 7 expected expression |
