Bug 13103 – struct initialization w/ null for Rebindable!(const Object) fails

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-12T02:30:33Z
Last change time
2024-12-01T16:21:50Z
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: phobos#10071 →

Comments

Comment #0 by pro.mathias.lang — 2014-07-12T02:30:33Z
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)) }
Comment #1 by robert.schadek — 2024-12-01T16:21:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10071 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB