[Bug 183] New: ICE: in complete_ctor_at_level_p, at expr.c:5775 (ctor of struct containing union fails)
via D.gnu
d.gnu at puremagic.com
Tue Apr 28 00:48:31 PDT 2015
http://bugzilla.gdcproject.org/show_bug.cgi?id=183
Bug ID: 183
Summary: ICE: in complete_ctor_at_level_p, at expr.c:5775 (ctor
of struct containing union fails)
Product: GDC
Version: 4.9.x
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Normal
Component: gdc
Assignee: ibuclaw at gdcproject.org
Reporter: drug2004 at bk.ru
If struct contains union of structs its ctor fails.
union Coord
{
struct
{
double x, y, z;
}
struct
{
double lon, lat, alt;
}
}
struct Foo
{
Coord coord;
this(double x, double y, double z)
{
this.coord.x = x;
this.coord.y = y;
this.coord.z = z;
}
}
void main()
{
auto foo = Foo(0, 0, 0);
}
if change Coord to
struct Coord
{
double x, y, z;
}
the code compiles.
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20150428/c1f45c5c/attachment.html>
More information about the D.gnu
mailing list