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

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |rg

--- Comment #1 from [email protected] ---
> The function on the const one that matches better should be called.

Neither of the string opApply's is an exact match due to the const missmatch on
`this` or the delegate parameter => "match with implicit conversions". Partial
ordering then selects the mutable overload because it is "more specialized"
(cannot be called by the const overload).

Not sure why the int overloads expose a different behaviour.

See https://dlang.org/spec/function.html#function-overloading

--

Reply via email to