Bug 3220 – Compile time union crash when passed to template
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2009-07-31T19:58:00Z
Last change time
2015-06-09T01:28:07Z
Keywords
ice-on-invalid-code
Assigned to
nobody
Creator
jeremiep
Comments
Comment #0 by jeremiep — 2009-07-31T19:58:03Z
The following crashes DMD when trying to convert floating point to integral at compile time using an union:
---
import std.metastrings;
union A {
double x;
int y;
}
alias ToString!(A(5.2).y) B; // Crashes here
---
Comment #1 by clugdbug — 2010-08-18T06:34:00Z
Fixed in DMD2.040. Probably a duplicate -- several crashing bugs were fixed in that release.