D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3220 - Compile time union crash when passed to template
Summary: Compile time union crash when passed to template
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2009-07-31 19:58 UTC by Jeremie Pelletier
Modified: 2015-06-09 01:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jeremie Pelletier 2009-07-31 19:58:03 UTC
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 Don 2010-08-18 06:34:00 UTC
Fixed in DMD2.040. Probably a duplicate -- several crashing bugs were fixed in that release.