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

RazvanN <razvan.nitu1...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1...@gmail.com

--- Comment #3 from RazvanN <razvan.nitu1...@gmail.com> ---
I'm not sure if this bug report is valid. The current behavior might be a
future.
If this "bug" would be fixed there would be absolutely no way of calling fun1()
from within the WithStatement body and that IMHO is an arbitrary limitation.

As things stand now, the compiler first tries to resolve fun1 as a member of S1
and if that's not possible it goes up the enclosing scope. If the chain of
scopes is over and fun1 still wasn't resolved then opDispatch is called. In my
opinion this makes a lot more sense then calling opDispatch for every method
that is not defined in the struct.

--

Reply via email to