[Issue 2270] cast produces invalid arrays at runtime
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 11 06:41:10 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=2270
--- Comment #5 from yebblies <yebblies at gmail.com> 2011-07-11 23:36:00 EST ---
I do understand, but nothing you've said changes the fact that the behavior is
completely intentional. Cast is, as always, a blunt instrument that bypasses
the type system. Another example would be casting int to float vs casting
int[] to float[]. The compiler's behavior here is as intended and consistent.
Since 2008, when this bug was reported, some things have improved. This cast
is not allowed in @safe code and std.conv.to is quite capable of performing the
element by element conversion. I don't see introducing an implicit allocation
and a loop as the solution when the safe way is already supported.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list