diff options
| author | Mel <mel@rnrd.eu> | 2026-05-24 18:18:23 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2026-05-24 18:18:23 +0200 |
| commit | a76fd9b5af153773273121c7aec2a9cbeed1dfb7 (patch) | |
| tree | a6c619e44df4f38f60c457b9122e207b0a3c09f0 /boot/tests | |
| parent | 8c4c219c945dfb41415e04654f488f7880e58ca2 (diff) | |
| download | catskill-a76fd9b5af153773273121c7aec2a9cbeed1dfb7.tar.zst catskill-a76fd9b5af153773273121c7aec2a9cbeed1dfb7.zip | |
Make diagnostics generic over passes, condensing different error handling
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/tests')
| -rw-r--r-- | boot/tests/lower/shadowing_error.cskt | 4 | ||||
| -rw-r--r-- | boot/tests/lower/type_cycle_error.cskt | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/boot/tests/lower/shadowing_error.cskt b/boot/tests/lower/shadowing_error.cskt index b22dddf..34eacc4 100644 --- a/boot/tests/lower/shadowing_error.cskt +++ b/boot/tests/lower/shadowing_error.cskt @@ -25,5 +25,5 @@ main = fun () { (declaration x (ref int) (initializer (expr 1))) ))) (emission_order 0 1 2 3 4 5 6 7) - (diagnostics - (error "name 'x' shadows an existing binding"))) + (lower_errors + (name-shadows x))) \ No newline at end of file diff --git a/boot/tests/lower/type_cycle_error.cskt b/boot/tests/lower/type_cycle_error.cskt index 29b791e..c6bfb6c 100644 --- a/boot/tests/lower/type_cycle_error.cskt +++ b/boot/tests/lower/type_cycle_error.cskt @@ -22,8 +22,5 @@ B = type { a A } (type 8 A structure (field b (ref B)) (depends_on 9)) (type 9 B structure (field a (ref A)) (depends_on 8))) (emission_order 0 1 2 3 4 5 6 7) - (diagnostics - (error "type cycle detected: - A (line 1) depends on B - B (line 2) depends on A -hint: break the cycle with a reference (use `&T` instead of `T`). :)"))) + (lower_errors + (type-cycle (chain A B)))) \ No newline at end of file |
