[Issue 2095] covariance w/o typechecks = bugs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 17 16:58:50 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2095
--- Comment #18 from Stewart Gordon <smjg at iname.com> 2010-11-17 16:57:33 PST ---
(In reply to comment #17)
> Really, the only question is whether you can get away with it with
> some form of const, and I believe that the consensus on it in the
> newsgroup last time that this was discussed was that you couldn't.
> I'd have to go digging through the archives though to find the
> exact thread.
I've no idea what discussion you're thinking of either. But I've studied it -
see comment 4. But to summarise, the following implicit conversions should be
allowed:
B[] to const(A)[]
const(B)[] to const(A)[]
immutable(B)[] to immutable(A)[]
immutable(B)[] to const(A)[]
> This can and should be disallowed at compile time. It's a definite
> bug. It just hasn't been fixed yet.
Yes, in the spec.
--
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