Bug 7580 – Identity assignment of Nullable crashes dmd

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-25T04:34:00Z
Last change time
2012-02-25T18:44:07Z
Keywords
ice, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-02-25T04:34:30Z
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; }
Comment #1 by k.hara.pg — 2012-02-25T09:03:29Z
Comment #2 by github-bugzilla — 2012-02-25T15:59:22Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9d24a9916f573bb78504ef9a642fd7747f282393 fix Issue 7580 - Identity assignment of Nullable crashes dmd https://github.com/D-Programming-Language/dmd/commit/a03216f62665b8e04d2d67dc1b52dc3ec8826163 Merge pull request #762 from 9rnsr/fix7580 Issue 7580 - Identity assignment of Nullable crashes dmd
Comment #3 by k.hara.pg — 2012-02-25T18:44:07Z
*** Issue 7588 has been marked as a duplicate of this issue. ***