Sema: implement cast from anon struct ptr to union ptr
This commit is contained in:
@@ -5036,6 +5036,13 @@ pub const Type = extern union {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn isAnonStruct(ty: Type) bool {
|
||||
return switch (ty.tag()) {
|
||||
.anon_struct => true,
|
||||
else => false,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn isTupleOrAnonStruct(ty: Type) bool {
|
||||
return switch (ty.tag()) {
|
||||
.tuple, .empty_struct_literal, .anon_struct => true,
|
||||
|
||||
Reference in New Issue
Block a user