relax language requirements regarding else unreachable
parent
8bf425957b
commit
b952b84486
|
@ -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");
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Reference in New Issue