Max Samukha <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Max Samukha <> 2011-08-16 02:39:02 
PDT ---
I am not sure. opDispatch is meant to be a fallback mechanism used after all
regular lookups fail. For example, one intended use of opDispatch is to
dynamically handle calls to members unavailable statically. With "alias this"
given the lowest priority, one would need to manually forward calls to
inherited members:

struct A
   Variant i;
   alias i this;

   auto opDispatch(string name, A...)(auto ref A args)
       static if (isCallableOnI!(name, A)))
           mixin("return i." ~ name ~ "(args);"); // this shouldn't be
           return dispatchDynamically(name, toVariants(args));                 

So the bug is in opDispatch not being considered after "alias this" lookup
fails, and not in the order of lookups.

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

Reply via email to