http://d.puremagic.com/issues/show_bug.cgi?id=9133
Jonathan M Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Component|Phobos |DMD --- Comment #1 from Jonathan M Davis <[email protected]> 2012-12-10 02:09:16 PST --- It's an issue with dmd. For whatever reason, it won't let you assign a SysTime to const or immutable even though everything in it should be convertible to const. The fact that it contains reference to a class screws it up, even though it's immutable. You have to have a postblit to fix it, but you can't have a const or immutable postblit, so you can't copy it if it's const or immutable. This problem occurs with every single struct which has reference types in it aside from dynamic arrays. It's something that needs to be solved in the language and the compiler. So, it comes down to two things: 1. dmd should be smart enough to realize that it doesn't need a postblit constructor in this case (because the class is immutable), but it isn't. 2. postblit is inherently broken with regards to const and immutable. This is a huge problem that goes way beyond just std.datetime. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
