authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-12 19:45:33-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-12 19:45:33-05:00
loge54c49be9b4b1a97805a3ffaab3f21bac48b8851
treea84797a9ccbc4bf9d6afa55a067eebe053a88103
parent1e4bae669233042e60a9201158ac239a64fb4c66
signaturelock-open Commit is signed but in an unrecognized format.

uncomment a now-passing behavior test


1 files changed, 8 insertions(+), 9 deletions(-)

test/stage1/behavior/cast.zig+8-9
......@@ -240,19 +240,18 @@ fn testCastConstArrayRefToConstSlice() void {
240240}
241241
242242test "peer type resolution: error and [N]T" {
243 // TODO: implicit error!T to error!U where T can implicitly cast to U
244 //expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
245 //comptime expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
243 expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
244 comptime expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK"));
246245 expect(mem.eql(u8, try testPeerErrorAndArray2(1), "OKK"));
247246 comptime expect(mem.eql(u8, try testPeerErrorAndArray2(1), "OKK"));
248247}
249248
250//fn testPeerErrorAndArray(x: u8) error![]const u8 {
251// return switch (x) {
252// 0x00 => "OK",
253// else => error.BadValue,
254// };
255//}
249fn testPeerErrorAndArray(x: u8) anyerror![]const u8 {
250 return switch (x) {
251 0x00 => "OK",
252 else => error.BadValue,
253 };
254}
256255fn testPeerErrorAndArray2(x: u8) anyerror![]const u8 {
257256 return switch (x) {
258257 0x00 => "OK",