From cec766f73c298d287c20d1bd830c159958fe177d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 31 Mar 2021 18:30:23 -0700 Subject: stage2: compile error for duplicate switch value on boolean --- src/AstGen.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/AstGen.zig') 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); -- cgit v1.2.3