[Issue 5862] case statement allows runtime values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 19 10:42:02 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5862
Stewart Gordon <smjg at iname.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
URL| |http://www.digitalmars.com/
| |d/1.0/statement.html#CaseSt
| |atement
CC| |smjg at iname.com
Platform|Other |All
Resolution|INVALID |
--- Comment #4 from Stewart Gordon <smjg at iname.com> 2011-06-19 10:37:14 PDT ---
http://www.digitalmars.com/d/1.0/statement.html#CaseStatement
"The case expressions must all evaluate to a constant value or array. They must
be implicitly convertible to the type of the switch Expression."
http://www.digitalmars.com/d/2.0/statement.html#CaseStatement
"The case expressions must all evaluate to a constant value or array, or a
runtime initialized const or immutable variable of integral type. They must be
implicitly convertible to the type of the switch Expression."
Strangely, 1.068 (Win32) correctly rejects the code.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list