Bug 3257 – Spec is unclear describing string switch case labels

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-08-18T06:28:00Z
Last change time
2015-06-09T01:28:06Z
Assigned to
nobody
Creator
jlquinn

Comments

Comment #0 by jlquinn — 2009-08-18T06:28:13Z
In the docs, it describes the allowable string case labels as follows: Both ascii and wchar strings are allowed. Is this true? Or are char utf-8 and dchar strings also allowed? If not, it seems a strange restriction. It is also unclear if compile-time-evaluable expressions are allowed for string case labels. The general text on switches makes it seem so, but the above text moddies the waters a little, I think.
Comment #1 by jarrett.billingsley — 2009-08-18T07:40:23Z
Wow. D used to have "ascii" and "unicode" strings before the current scheme, which means that description is just several years out-of-date ;)
Comment #2 by bugzilla — 2009-09-03T13:45:38Z
Fixed dmd 2.032