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



--- Comment #4 from timon.g...@gmx.ch 2011-11-10 11:42:45 PST ---
(In reply to comment #3)
> So let my try to understand what inout(const(T)) actually means.
> 
> If inout resolves to mutable or const, this becomes const(T)
> If inout resolves to immutable, this becomes immutable(T)
> If inout resolves to inout (i.e. nested inout function), then it stays as
> inout(const(T))
> 
> Is this correct?

Those were my thoughts, yes.

> 
> So what I think this boils down to is that inout(T) and immutable(T) should
> implicitly cast to inout(const(T)), given the rules above.  It sure seems
> plausible.

Yes, exactly. (That follows from inout(const(T)) being the combined type.)

> 
> I think the same should be extended to inout(const(T))* and inout(const(T))[]
> 

Good point.

> I'd like Kenji to weigh in (added to CC).  Does this affect the patch in bug
> 6912?

Yes it does, the patch for 6912 currently claims inout(const(T)) is const(T).

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

Reply via email to