https://issues.dlang.org/show_bug.cgi?id=16572

Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com

--- Comment #3 from Steven Schveighoffer <schvei...@yahoo.com> ---
(In reply to anonymous4 from comment #2)
> A small interaction between contravariance and inout here:
> inout(A) f(inout B b) inout;
> If you resolve the type as A delegate(B) you can't pass const(B) as argument.

You wouldn't be able to take a valid delegate of this. Or at least an
operational one.

The delegate type would have to be something like:

inout(A) delegate(inout B) inout=const

We don't have a way to express this.

As it stands, I think the delegate to this would have to be:

const(A) delegate(const(B) b) const

--

Reply via email to