Bug 14154 – [e2ir] Error in e2ir at casting to struct

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-02-09T08:35:00Z
Last change time
2015-02-21T09:11:20Z
Keywords
ice, pull
Assigned to
nobody
Creator
ketmar

Comments

Comment #0 by ketmar — 2015-02-09T08:35:45Z
mixin template XTypedef (T, string name, T init=T.init) { mixin(`static struct `~name~q{{ public alias k_8_i_m_p_l this; private T k_8_i_m_p_l=init; }}); } void test () { mixin XTypedef!(ubyte, `uint8`); mixin XTypedef!(int, `MyInt`); MyInt mi; ubyte t = cast(uint8)mi; } zzbug.d(13): Error: e2ir: cannot cast mi.k_8_i_m_p_l of type int to type uint8
Comment #1 by k.hara.pg — 2015-02-10T13:23:43Z
Comment #2 by github-bugzilla — 2015-02-10T14:44:12Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ba48f01ddd6a3e294630c887a67e3ab5d5caabed fix Issue 14154 - [e2ir] Error in e2ir at casting to struct https://github.com/D-Programming-Language/dmd/commit/6d900021322ad02a15acc7cd7219fdb391da9e40 Merge pull request #4401 from 9rnsr/fix14154 Issue 14154 - [e2ir] Error in e2ir at casting to struct
Comment #3 by github-bugzilla — 2015-02-21T09:11:20Z