[Issue 2270] cast produces invalid arrays at runtime

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 11 04:33:36 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=2270



--- Comment #4 from Stewart Gordon <smjg at iname.com> 2011-07-11 04:28:28 PDT ---
> On the other hand, I can't see anybody wanting what actually happens when you
> try casting an object array to an interface array.  And it's an easy mistake to
> make, either
> - by someone who hasn't yet learned that they aren't compatible
> - by forgetting whether something's a class or an interface
> - when trying in vain to do generic programming stuff that will work with
> either classes or interfaces

Add to that: when a library template that was only designed to work with
classes contains such code, and somebody tries to use it with an interface.

-- 
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