From 1631b4626cc63bc795f33d06b42bb227686e9678 Mon Sep 17 00:00:00 2001 From: mlugg Date: Sat, 10 Aug 2024 05:35:49 +0100 Subject: [PATCH] cases: tweaks for changed errors * Surprise, another language change! Discussed with Andrew as I was doing this branch; `@setAlignStack` should apply to the caller in inline calls, and having it multiple times should choose the max, like `@setEvalBranchQuota`. * I made one error message make more sense cuz the type name was weird before :) --- .../setAlignStack_in_inline_function.zig | 22 ------------------- .../setAlignStack_set_twice.zig | 11 ---------- ...n_invalid_value_of_non-exhaustive_enum.zig | 2 +- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 test/cases/compile_errors/setAlignStack_in_inline_function.zig delete mode 100644 test/cases/compile_errors/setAlignStack_set_twice.zig diff --git a/test/cases/compile_errors/setAlignStack_in_inline_function.zig b/test/cases/compile_errors/setAlignStack_in_inline_function.zig deleted file mode 100644 index a84424e368c0..000000000000 --- a/test/cases/compile_errors/setAlignStack_in_inline_function.zig +++ /dev/null @@ -1,22 +0,0 @@ -export fn entry() void { - foo(); -} -inline fn foo() void { - @setAlignStack(16); -} - -export fn entry1() void { - comptime bar(); -} -fn bar() void { - @setAlignStack(16); -} - -// error -// backend=stage2 -// target=native -// -// :5:5: error: @setAlignStack in inline function -// :2:8: note: called from here -// :12:5: error: @setAlignStack in inline call -// :9:17: note: called from here diff --git a/test/cases/compile_errors/setAlignStack_set_twice.zig b/test/cases/compile_errors/setAlignStack_set_twice.zig deleted file mode 100644 index 3c61b26becd8..000000000000 --- a/test/cases/compile_errors/setAlignStack_set_twice.zig +++ /dev/null @@ -1,11 +0,0 @@ -export fn entry() void { - @setAlignStack(16); - @setAlignStack(16); -} - -// error -// backend=stage2 -// target=native -// -// :3:5: error: multiple @setAlignStack in the same function body -// :2:5: note: other instance here diff --git a/test/cases/compile_errors/tagName_on_invalid_value_of_non-exhaustive_enum.zig b/test/cases/compile_errors/tagName_on_invalid_value_of_non-exhaustive_enum.zig index 06e17a1e873b..14138557f8a9 100644 --- a/test/cases/compile_errors/tagName_on_invalid_value_of_non-exhaustive_enum.zig +++ b/test/cases/compile_errors/tagName_on_invalid_value_of_non-exhaustive_enum.zig @@ -8,5 +8,5 @@ test "enum" { // target=native // is_test=true // -// :3:9: error: no field with value '@enumFromInt(5)' in enum 'test.enum.E' +// :3:9: error: no field with value '@enumFromInt(5)' in enum 'tmp.test.enum.E' // :2:15: note: declared here