Bug 10091 – [HEAD] Cannot cast struct member string enum to static ubyte array of same size

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-15T23:38:00Z
Last change time
2013-05-18T17:24:50Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2013-05-15T23:38:04Z
--- struct S { enum e = "a"; } void main() { auto arr = cast(ubyte[1]) S.e; // Error: e2ir: cannot cast "a" of type string to type ubyte[1u] } ---
Comment #1 by k.hara.pg — 2013-05-17T23:25:57Z
Comment #2 by github-bugzilla — 2013-05-18T17:18:35Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5c9b4135f7dfd88d7bfa387473568d3e6f3aeafd fix Issue 10091 - Cannot cast struct member string enum to static ubyte array of same size https://github.com/D-Programming-Language/dmd/commit/acce1d9090c67dea90edd703fd33c124794ccce2 Merge pull request #2048 from 9rnsr/fix10091 [REG2.063a] Issue 10091 - Cannot cast struct member string enum to static ubyte array of same size
Comment #3 by github-bugzilla — 2013-05-18T17:19:32Z
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6ef65886f05d945750c6dabe71dcef900166a4f3 Merge pull request #2048 from 9rnsr/fix10091 [REG2.063a] Issue 10091 - Cannot cast struct member string enum to static ubyte array of same size