authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-07 13:06:21-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-07 13:06:21-07:00
log090834380cff9f2743f9c71e8e141ac5aceb747e
treeed0737b7dd104f8c6d10968640eafefe2015aafa
parente32898b0dedf1da13798f798d2825113b0be748b

Type: use isPtrLikeOptional instead of isAbiPtr

Thanks @Vexu

1 files changed, 1 insertions(+), 6 deletions(-)

src/type.zig+1-6
......@@ -139,7 +139,7 @@ pub const Type = extern union {
139139 => false,
140140
141141 .Pointer => is_equality_cmp or ty.isCPtr(),
142 .Optional => is_equality_cmp and ty.isAbiPtr(),
142 .Optional => is_equality_cmp and ty.isPtrLikeOptional(),
143143 };
144144 }
145145
......@@ -1619,11 +1619,6 @@ pub const Type = extern union {
16191619 }
16201620 }
16211621
1622 /// Returns whether the type is represented as a pointer in the ABI.
1623 pub fn isAbiPtr(self: Type) bool {
1624 @panic("TODO implement this");
1625 }
1626
16271622 /// Asserts that the type is an error union.
16281623 pub fn errorUnionChild(self: Type) Type {
16291624 return switch (self.tag()) {