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



--- Comment #9 from Steven Schveighoffer <schvei...@yahoo.com> 2011-11-10 
12:50:44 PST ---
(In reply to comment #8)
> (In reply to comment #6)
> > I think this issue is an enhancement.
> 
> I strongly disagree. What qualifies it as an enhancement for you?

It *is* an enhancement, because the common type can just as easily be const,
and the code is still valid.  You are asking for an incremental change to how
inout works.

> I am not saying that this has an enormous priority, but it definitely is a bug
> in my eyes. The inout qualifier has failed if there are cases where it could
> work but does not.

inout's primary focus is transferring the type modifier from the arguments to
the return type.  Merging it with a possible external immutable type is
secondary.

I think inout(const(T)) should resolve as we've discussed.  The enhancement is
that immutable(T) and inout(T) should be implicitly castable to
inout(const(T)).  Those aspects were not envisioned when the feature was
created, so it works as designed (provided the resolution of inout(const(T)) is
fixed).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to