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 b36f480654..3f6e3ef282 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -4400,6 +4400,13 @@ pub const Type = extern union {
};
}
+ pub fn isArrayLike(ty: Type) bool {
+ return switch (ty.zigTypeTag()) {
+ .Array, .Vector => true,
+ else => false,
+ };
+ }
+
pub fn isIndexable(ty: Type) bool {
return switch (ty.zigTypeTag()) {
.Array, .Vector => true,