From e864c38cc38095a1496229803465fdd0d079f9c3 Mon Sep 17 00:00:00 2001 From: mlugg Date: Wed, 22 Jan 2025 04:16:16 +0000 Subject: Sema: fix crash when `inline` loop condition is not comptime-known --- lib/std/zig.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/std/zig.zig') diff --git a/lib/std/zig.zig b/lib/std/zig.zig index 6fec585326..4ebb95c522 100644 --- a/lib/std/zig.zig +++ b/lib/std/zig.zig @@ -788,6 +788,7 @@ pub const SimpleComptimeReason = enum(u32) { // Miscellaneous reasons. comptime_keyword, comptime_call_modifier, + inline_loop_operand, switch_item, tuple_field_default_value, struct_field_default_value, @@ -863,6 +864,7 @@ pub const SimpleComptimeReason = enum(u32) { .comptime_keyword => "'comptime' keyword forces comptime evaluation", .comptime_call_modifier => "'.compile_time' call modifier forces comptime evaluation", + .inline_loop_operand => "inline loop condition must be comptime-known", .switch_item => "switch prong values must be comptime-known", .tuple_field_default_value => "tuple field default value must be comptime-known", .struct_field_default_value => "struct field default value must be comptime-known", -- cgit v1.2.3