diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-31 18:30:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-31 18:30:23 -0700 |
| commit | cec766f73c298d287c20d1bd830c159958fe177d (patch) | |
| tree | 6e7c247f87a472aff9f7c42b70da8aba5e40916b /src/AstGen.zig | |
| parent | fedc9ebd26175bf8309d665f3e1ee6769e8af86d (diff) | |
| download | zig-cec766f73c298d287c20d1bd830c159958fe177d.tar.gz zig-cec766f73c298d287c20d1bd830c159958fe177d.zip | |
stage2: compile error for duplicate switch value on boolean
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 28413bb424..81e48a04e0 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -2551,13 +2551,15 @@ pub const SwitchProngSrc = union(enum) { item: u32, }; + pub const RangeExpand = enum { none, first, last }; + /// This function is intended to be called only when it is certain that we need /// the LazySrcLoc in order to emit a compile error. pub fn resolve( prong_src: SwitchProngSrc, decl: *Decl, switch_node_offset: i32, - range_expand: enum { none, first, last }, + range_expand: RangeExpand, ) LazySrcLoc { @setCold(true); const switch_node = decl.relativeToNodeIndex(switch_node_offset); |
