Re: onDispatch demo not compiling

2014-08-20 Thread ketmar via Digitalmars-d-learn
On Thu, 21 Aug 2014 06:34:10 + Shachar via Digitalmars-d-learn wrote: > Indeed. I ended up simply directly calling > "a.opDispatch!"do_something_cool"(5, 6)", which brought most of > those issues to light. ah, silly me. i forgot about such simple thing. signature.asc Description: PGP sign

Re: onDispatch demo not compiling

2014-08-20 Thread Shachar via Digitalmars-d-learn
On Thursday, 21 August 2014 at 06:11:06 UTC, ketmar via Digitalmars-d-learn wrote: that will do the trick. Indeed. I ended up simply directly calling "a.opDispatch!"do_something_cool"(5, 6)", which brought most of those issues to light. Shachar

Re: onDispatch demo not compiling

2014-08-20 Thread ketmar via Digitalmars-d-learn
On Thu, 21 Aug 2014 05:39:14 + Shachar via Digitalmars-d-learn wrote: that's it: failing to evaluate opDispatch() template is not a compilation error. compiler will silently try to find direct method if opDispatch() fails. so be very careful with it. you can add pragma(msg, "...") to your op

Re: onDispatch demo not compiling

2014-08-20 Thread ketmar via Digitalmars-d-learn
On Thu, 21 Aug 2014 05:39:14 + Shachar via Digitalmars-d-learn wrote: > auto onDispatch(string m, Args...)(Args args) first: opDispatch, not onDispatch. second: underscoresToCamelCase() can't be evaluated in compile-time anymore. the necessary changes: 1. add 'import std.string' -- we need

onDispatch demo not compiling

2014-08-20 Thread Shachar via Digitalmars-d-learn
I'm trying to compile the onDispatch demo program from "The D Programming Language" (page 387). At first I had an import problem, but I fixed that. Now, however, when I try to call "a.do_something_cool", I get an error message saying: onDispatch.d(43): Error: no property 'do_something_cool' fo