[Issue 20613] String switch in -betterC fails for 7+ labels

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 26 12:43:09 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20613

--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Simen Kjaeraas from comment #0)
> Testing indicates the whole anonymous lambda dance used there could be
> replaced with
>     static immutable cases = [caseLabels];

Indeed, I would think that a valid solution. The caseLabels are passed at
compile time, so I don't see why they would need to be idup'd.

I'm not sure why Martin did it the way he did. I'll ask him.

--


More information about the Digitalmars-d-bugs mailing list