commit 0768115b01f01ab1c75da3e42ffcdc99078eaad2 (tree)
parent 202e8a0589b4e02dac0694e3eb30ac0b51ec3f6c
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date: Mon, 19 Dec 2022 05:49:15 -0500
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".
Diffstat:
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/value.zig b/src/value.zig
@@ -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,
diff --git a/test/behavior/bugs/3742.zig b/test/behavior/bugs/3742.zig
@@ -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"));
}