[Issue 7580] New: Identity assignment of Nullable crashes dmd
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 25 04:34:32 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7580
Summary: Identity assignment of Nullable crashes dmd
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: ice
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-02-25 04:34:30 PST ---
Following code compilation crashes dmd.
import std.typecons;
void main()
{
Nullable!(int, 0) ni;
ni = ni;
}
This is alias this issue that fallbacks to template member function.
Reduced test case:
struct S(T)
{
void opAssign()(T value) {}
}
struct X(T)
{
private T val;
@property ref inout(T) get()() inout { return val; }
alias get this;
}
void test()
{
S!(int) s;
X!int x;
s = x;
}
--
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