aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/type.zig b/src/type.zig
index e1e6a0ada2..63b506f890 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -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,