[Issue 5862] case statement allows runtime values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 27 14:39:28 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=5862
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nick at geany.org
--- Comment #8 from Nick Treleaven <nick at geany.org> ---
(In reply to Andrej Mitrovic from comment #0)
> case y: // <- should not be allowed
comment #4:
> Strangely, 1.068 (Win32) correctly rejects the code.
Also rejected on Linux now:
switchmut.d(14): Error: `case` variables have to be `const` or `immutable`
--
More information about the Digitalmars-d-bugs
mailing list