mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Type: use isPtrLikeOptional instead of isAbiPtr
Thanks @Vexu
This commit is contained in:
parent
e32898b0de
commit
090834380c
@ -139,7 +139,7 @@ pub const Type = extern union {
|
||||
=> false,
|
||||
|
||||
.Pointer => is_equality_cmp or ty.isCPtr(),
|
||||
.Optional => is_equality_cmp and ty.isAbiPtr(),
|
||||
.Optional => is_equality_cmp and ty.isPtrLikeOptional(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -1619,11 +1619,6 @@ pub const Type = extern union {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns whether the type is represented as a pointer in the ABI.
|
||||
pub fn isAbiPtr(self: Type) bool {
|
||||
@panic("TODO implement this");
|
||||
}
|
||||
|
||||
/// Asserts that the type is an error union.
|
||||
pub fn errorUnionChild(self: Type) Type {
|
||||
return switch (self.tag()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user