digitalmars.D.bugs - [Issue 13103] New: struct initialization w/ null for
- via Digitalmars-d-bugs (30/30) Jul 11 2014 https://issues.dlang.org/show_bug.cgi?id=13103
https://issues.dlang.org/show_bug.cgi?id=13103 Issue ID: 13103 Summary: struct initialization w/ null for Rebindable!(const Object) fails Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: pro.mathias.lang gmail.com This code fails to compile under master (2206d5075df746a7da28ad3697f6f6514e5217ca) and 2.065.0: import std.typecons : Rebindable, rebindable; struct Test { Rebindable!(Object) obj; Rebindable!(const Object) cobj; } void main() { Test t1; // Okay Test t2 = Test(null); // Okay t2.cobj = null; // Still okay Test t3 = Test(null, null); // Error: cannot implicitly convert expression (null) of type typeof(null) to Rebindable!(const(Object)) } --
Jul 11 2014