On Mon, 25 May 2015 09:24:56 +0000, ZombineDev wrote: > On Monday, 25 May 2015 at 07:57:49 UTC, ketmar wrote: >> i don't know why you want that, but something like this may do: >> >> auto callBaseMethod(string MTN, C, Args...) (inout C self, Args args) { >> alias FSC = BaseClassesTuple!(C)[0]; >> return mixin(`self.`~FSC.stringof~`.`~MTN~"(args)"); >> } >> >> writeln(d.callBaseMethod!"toString"); >> >> > Thanks!
note that this funny trick works even for `void` methods, due to magic of `auto` return type.
signature.asc
Description: PGP signature