http://d.puremagic.com/issues/show_bug.cgi?id=6176
Stewart Gordon <s...@iname.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rejects-valid |spec CC| |s...@iname.com Severity|normal |enhancement --- Comment #1 from Stewart Gordon <s...@iname.com> 2011-06-19 10:39:42 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." So the code is illegal. Clearly this is a mistake in TDPL. Though I am made to wonder why this restriction is there. Changing to enhancement for the meantime. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------