relax language requirements regarding else unreachable

master
Andrew Kelley 2020-01-13 17:08:28 -05:00
parent 8bf425957b
commit b952b84486
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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" {