http://d.puremagic.com/issues/show_bug.cgi?id=1835



--- Comment #8 from Fawzi Mohamed <fa...@gmx.ch> 2010-07-24 16:18:40 PDT ---
Yes indeed and Christian showed this templates argument allows one workaround
to achieve this (a wrapper object is another).

{{{
class A {
  void a(...){ ... }
  T aChain(this T)() {
   a();
   return cast(T)this;
  }
}
class B {
  void a(...){ ... }
}
}}}

it might even be cleaner to have also a non chainable version, the return this
is really a convenience, and not strictly part of the operation itself, even if
it implies some duplication.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to