[Issue 2056] Const system does not allow certain safe casts/conversions involving deep composite types
https://issues.dlang.org/show_bug.cgi?id=2056 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|2.013 |D2 --
[Issue 2056] Const system does not allow certain safe casts/conversions involving deep composite types
http://d.puremagic.com/issues/show_bug.cgi?id=2056 --- Comment #4 from Bruno Medeiros bdom.pub+deeb...@gmail.com 2010-11-18 04:06:29 PST --- A regression? Not exactly. When this bug was submitted, the lines marked with // Error here did not compile, and that was the bug that was reported. At some point DMD was changed so that the first, and later both code samples above compiled without errors. (I don't know if it was because Walter tried to fix this bug specifically, or if it was due to some other DMD changes). So this bug became fixed, but as I found after seeing #2544, this bug is actually invalid, and should not have been fixed in the first place. ( For curiosity, it would only be valid if immutable did not exist, or more precisely, if T was the only subtype of const(T) ) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2056] Const system does not allow certain safe casts/conversions involving deep composite types
http://d.puremagic.com/issues/show_bug.cgi?id=2056 --- Comment #5 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-18 12:11:28 PST --- When this bug was submitted, the lines marked with // Error here did not compile So what does the fix for bug 3621, I wonder? (It's for dmd 2.038) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2056] Const system does not allow certain safe casts/conversions involving deep composite types
http://d.puremagic.com/issues/show_bug.cgi?id=2056 Bruno Medeiros bdom.pub+deeb...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Bruno Medeiros bdom.pub+deeb...@gmail.com 2010-11-17 12:15:17 PST --- The latest DMD compiles both code samples now, *however*, I've come to realize that in fact this code should NOT be allowed (that is, any of the Error here lines in the code above should produce an error), because these casts are actually not safe. For the reasons why, see bug #2544 , which is the inverse of this one. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2056] Const system does not allow certain safe casts/conversions involving deep composite types
http://d.puremagic.com/issues/show_bug.cgi?id=2056 --- Comment #3 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-17 14:21:51 PST --- So this is a regression? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---