[Issue 9843] New: DMD segfaults after error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 30 19:21:00 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9843
Summary: DMD segfaults after error message
Product: D
Version: D2
Platform: x86
OS/Version: All
Status: NEW
Keywords: ice
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mk at krej.cz
--- Comment #0 from Martin Krejcirik <mk at krej.cz> 2013-03-30 19:20:57 PDT ---
module something;
import std.stdio;
struct ArgTest1
{
int itemid;
int number;
}
struct ArgTest2
{
string userid;
int[] items;
}
union Argument
{
int nul;
ArgTest1 test1;
ArgTest2 test2;
}
struct TestSt
{
Argument _arg = { nul : 0 };
this(ArgTest1 a) { }
}
class Something
{
immutable TestSt foo;
this()
{
foo = TestSt(ArgTest1(1,2));
}
void dowork()
{
writeln( foo );
}
}
dmd -c something.d
something.d(40): Error: cannot implicitly convert expression ((TestSt
__ctmp1218 = _D9something6TestSt6__initZ; , __ctmp1218).this(ArgTest1(1, 2)))
of type TestSt to immutable(TestSt)
Segmentation fault
dmd 2.062 32bit Linux/Windows
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list