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 {...@@ -139,7 +139,7 @@ pub const Type = extern union {
139 => false,139 => false,
140140
141 .Pointer => is_equality_cmp or ty.isCPtr(),141 .Pointer => is_equality_cmp or ty.isCPtr(),
142 .Optional => is_equality_cmp and ty.isAbiPtr(),142 .Optional => is_equality_cmp and ty.isPtrLikeOptional(),
143 };143 };
144 }144 }
145145
...@@ -1619,11 +1619,6 @@ pub const Type = extern union {...@@ -1619,11 +1619,6 @@ pub const Type = extern union {
1619 }1619 }
1620 }1620 }
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
1627 /// Asserts that the type is an error union.1622 /// Asserts that the type is an error union.
1628 pub fn errorUnionChild(self: Type) Type {1623 pub fn errorUnionChild(self: Type) Type {
1629 return switch (self.tag()) {1624 return switch (self.tag()) {