diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-07 22:19:17 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-07 22:19:17 -0700 |
| commit | 57aa289fdef543a507d8da039f5b7e7f2762c878 (patch) | |
| tree | 1e8f3c072f2c004554880cd23e53337bbc24a39b /src/type.zig | |
| parent | e730172e47749db8a9d3be5949231bde95343b39 (diff) | |
| download | zig-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.zig | 4 |
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, }; } |
