mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
stage2: pass generic poison up the chain in peer type resolution
This commit is contained in:
parent
0ce2d46ff9
commit
5e2e7675d5
@ -17612,9 +17612,8 @@ fn resolvePeerTypes(
|
||||
var chosen = instructions[0];
|
||||
var err_set_ty: ?Type = blk: {
|
||||
const chosen_ty = sema.typeOf(chosen);
|
||||
|
||||
// TODO: is this the right handling of generic poison?
|
||||
if (chosen_ty.tag() == .generic_poison or chosen_ty.zigTypeTag() != .ErrorSet)
|
||||
const chosen_ty_tag = try chosen_ty.zigTypeTagOrPoison();
|
||||
if (chosen_ty_tag != .ErrorSet)
|
||||
break :blk null;
|
||||
|
||||
// If our chosen type is inferred, we have to resolve it now.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user