Matthias Walter <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Matthias Walter <> 2012-07-19 23:58:04 PDT 
Does this bug report also cover the case of *returning* scope ref in order to
make the following possible:

scope ref T opIndex(...);

For example in std.container.Array this is helpful in order to write


because for by-value opIndex the method() is called on a *copy* of the first

On the other hand returning by (the usual) ref prevents the container from
being a 'sealed container' and hence the restriction would say:

"opIndex returns by reference but this reference may not be escaped but only be
used to call a method (including operators) on the returned object."

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to