behavior: disable failing test

Also add an assert to catch this issue earlier.  For future reference,
the decl without a type and value is the string literal "GET".
This commit is contained in:
Jacob Young 2022-12-19 05:49:15 -05:00
parent 202e8a0589
commit 0768115b01
2 changed files with 12 additions and 2 deletions

View File

@ -2915,8 +2915,16 @@ pub const Value = extern union {
.field_ptr => val.castTag(.field_ptr).?.data.container_ptr.isVariable(mod),
.eu_payload_ptr => val.castTag(.eu_payload_ptr).?.data.container_ptr.isVariable(mod),
.opt_payload_ptr => val.castTag(.opt_payload_ptr).?.data.container_ptr.isVariable(mod),
.decl_ref => mod.declPtr(val.castTag(.decl_ref).?.data).val.isVariable(mod),
.decl_ref_mut => mod.declPtr(val.castTag(.decl_ref_mut).?.data.decl_index).val.isVariable(mod),
.decl_ref => {
const decl = mod.declPtr(val.castTag(.decl_ref).?.data);
assert(decl.has_tv);
return decl.val.isVariable(mod);
},
.decl_ref_mut => {
const decl = mod.declPtr(val.castTag(.decl_ref_mut).?.data.decl_index);
assert(decl.has_tv);
return decl.val.isVariable(mod);
},
.variable => true,
else => false,

View File

@ -39,5 +39,7 @@ test "fixed" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_llvm and
builtin.cpu.arch == .aarch64 and builtin.os.tag == .windows) return error.SkipZigTest;
ArgSerializer.serializeCommand(GET.init("banana"));
}