aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-07 22:19:17 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-07 22:19:17 -0700
commit57aa289fdef543a507d8da039f5b7e7f2762c878 (patch)
tree1e8f3c072f2c004554880cd23e53337bbc24a39b /src/type.zig
parente730172e47749db8a9d3be5949231bde95343b39 (diff)
downloadzig-57aa289fdef543a507d8da039f5b7e7f2762c878.tar.gz
zig-57aa289fdef543a507d8da039f5b7e7f2762c878.zip
Sema: fix switch validation '_' prong on wrong type
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type.zig b/src/type.zig
index 1e52d2eb74..ab31991c36 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -2119,9 +2119,9 @@ pub const Type = extern union {
}
}
- pub fn isExhaustiveEnum(ty: Type) bool {
+ pub fn isNonexhaustiveEnum(ty: Type) bool {
return switch (ty.tag()) {
- .enum_full, .enum_simple => true,
+ .enum_nonexhaustive => true,
else => false,
};
}