diff --git a/test/stage1/behavior.zig b/test/stage1/behavior.zig index 62a6dedccd..e362a9405e 100644 --- a/test/stage1/behavior.zig +++ b/test/stage1/behavior.zig @@ -70,7 +70,7 @@ comptime { _ = @import("behavior/generics.zig"); _ = @import("behavior/hasdecl.zig"); _ = @import("behavior/hasfield.zig"); - //_ = @import("behavior/if.zig"); + _ = @import("behavior/if.zig"); _ = @import("behavior/import.zig"); _ = @import("behavior/incomplete_struct_param_tld.zig"); _ = @import("behavior/inttoptr.zig"); diff --git a/test/stage1/behavior/if.zig b/test/stage1/behavior/if.zig index 63c31fb03e..c309bc061f 100644 --- a/test/stage1/behavior/if.zig +++ b/test/stage1/behavior/if.zig @@ -72,7 +72,7 @@ test "const result loc, runtime if cond, else unreachable" { var t = true; const x = if (t) Num.Two else unreachable; - if (x != .Two) @compileError("bad"); + expect(x == .Two); } test "if prongs cast to expected type instead of peer type resolution" {