diff options
Diffstat (limited to 'test/cases/compile_errors')
| -rw-r--r-- | test/cases/compile_errors/branch_in_comptime_only_scope_uses_condbr_inline.zig | 7 | ||||
| -rw-r--r-- | test/cases/compile_errors/ignored_comptime_value.zig | 14 |
2 files changed, 7 insertions, 14 deletions
diff --git a/test/cases/compile_errors/branch_in_comptime_only_scope_uses_condbr_inline.zig b/test/cases/compile_errors/branch_in_comptime_only_scope_uses_condbr_inline.zig index 92e9620c99..9026d8c84f 100644 --- a/test/cases/compile_errors/branch_in_comptime_only_scope_uses_condbr_inline.zig +++ b/test/cases/compile_errors/branch_in_comptime_only_scope_uses_condbr_inline.zig @@ -16,7 +16,6 @@ pub export fn entry2() void { // backend=stage2 // target=native // -// :4:15: error: unable to resolve comptime value -// :4:15: note: condition in comptime branch must be comptime-known -// :11:11: error: unable to resolve comptime value -// :11:11: note: condition in comptime branch must be comptime-known +// :4:15: error: unable to evaluate comptime expression +// :4:13: note: operation is runtime due to this operand +// :11:11: error: unable to evaluate comptime expression diff --git a/test/cases/compile_errors/ignored_comptime_value.zig b/test/cases/compile_errors/ignored_comptime_value.zig index e1162459e6..3414d0861f 100644 --- a/test/cases/compile_errors/ignored_comptime_value.zig +++ b/test/cases/compile_errors/ignored_comptime_value.zig @@ -5,13 +5,7 @@ export fn b() void { comptime bar(); } fn bar() u8 { - const u32_max = @import("std").math.maxInt(u32); - - @setEvalBranchQuota(u32_max); - var x: u32 = 0; - while (x != u32_max) : (x +%= 1) {} - - return 0; + return 2; } // error @@ -21,6 +15,6 @@ fn bar() u8 { // :2:5: error: value of type 'comptime_int' ignored // :2:5: note: all non-void values must be used // :2:5: note: this error can be suppressed by assigning the value to '_' -// :5:17: error: value of type 'u8' ignored -// :5:17: note: all non-void values must be used -// :5:17: note: this error can be suppressed by assigning the value to '_' +// :5:5: error: value of type 'u8' ignored +// :5:5: note: all non-void values must be used +// :5:5: note: this error can be suppressed by assigning the value to '_' |
