authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-17 18:53:40+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-17 21:04:21+03:00
log28986a059075c2dce662c2f4e823b3efd283df87
treebeb90acdae662560c0c3a419858fd29fae362900
parenta224dfceee07a94d961506122a434563129428a5

stage2: check that struct is a tuple when value tags differ in eql


2 files changed, 1 insertions(+), 5 deletions(-)

lib/std/bit_set.zig-4
......@@ -1330,7 +1330,6 @@ fn testStaticBitSet(comptime Set: type) !void {
13301330}
13311331
13321332test "IntegerBitSet" {
1333 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
13341333 try testStaticBitSet(IntegerBitSet(0));
13351334 try testStaticBitSet(IntegerBitSet(1));
13361335 try testStaticBitSet(IntegerBitSet(2));
......@@ -1342,7 +1341,6 @@ test "IntegerBitSet" {
13421341}
13431342
13441343test "ArrayBitSet" {
1345 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
13461344 if (@import("builtin").cpu.arch == .aarch64) {
13471345 // https://github.com/ziglang/zig/issues/9879
13481346 return error.SkipZigTest;
......@@ -1357,7 +1355,6 @@ test "ArrayBitSet" {
13571355}
13581356
13591357test "DynamicBitSetUnmanaged" {
1360 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
13611358 const allocator = std.testing.allocator;
13621359 var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300);
13631360 try testing.expectEqual(@as(usize, 0), a.count());
......@@ -1398,7 +1395,6 @@ test "DynamicBitSetUnmanaged" {
13981395}
13991396
14001397test "DynamicBitSet" {
1401 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
14021398 const allocator = std.testing.allocator;
14031399 var a = try DynamicBitSet.initEmpty(allocator, 300);
14041400 try testing.expectEqual(@as(usize, 0), a.count());
src/value.zig+1-1
......@@ -2186,7 +2186,7 @@ pub const Value = extern union {
21862186 // A tuple can be represented with .empty_struct_value,
21872187 // the_one_possible_value, .aggregate in which case we could
21882188 // end up here and the values are equal if the type has zero fields.
2189 return ty.structFieldCount() != 0;
2189 return ty.isTupleOrAnonStruct() and ty.structFieldCount() != 0;
21902190 },
21912191 .Float => {
21922192 const a_nan = a.isNan();