diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:04:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:49:19 +0200 |
| commit | 1ee1d078e2480ddd08d40915bc7a74a8352acff0 (patch) | |
| tree | 1e7ff367278a19fead3e404cf06d65bfb80a6cd9 /tests/typ/code/if.typ | |
| parent | 42a27b48df427edf8dbb624c51551a90ecf2e7ea (diff) | |
Fatal errors
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free
- Parsing still recovers and can produce multiple errors
- Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import)
- The single error that could occur during execution is removed for now
- Removes Value::Error variant
Diffstat (limited to 'tests/typ/code/if.typ')
| -rw-r--r-- | tests/typ/code/if.typ | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/typ/code/if.typ b/tests/typ/code/if.typ index dd5d23a0..db8b059e 100644 --- a/tests/typ/code/if.typ +++ b/tests/typ/code/if.typ @@ -39,9 +39,16 @@ "Four" + point } +// Template can be argument or body depending on whitespace. +{ + if "template" == type[b] [Fi] else [Nope] + if "template" == type [Nope] else [ve.] +} + --- // Value of if expressions. // Ref: false + { let x = 1 let y = 2 @@ -61,13 +68,12 @@ } --- -// Ref: false - // Condition must be boolean. // If it isn't, neither branch is evaluated. // Error: 5-14 expected boolean, found string #if "a" + "b" { nope } #else { nope } +--- // Make sure that we don't complain twice. // Error: 5-12 cannot add integer and string #if 1 + "2" {} |
