Is this a bug when creating proxies in classes?

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 25 11:44:35 PDT 2014


On 08/25/2014 11:38 AM, "Marc Schütz" <schuetzm at gmx.net>" wrote:

 > On Monday, 25 August 2014 at 18:10:33 UTC, Gary Willoughby wrote:
 >> :!rdmd --force -de -debug -w test.d
 >> /usr/include/dmd/phobos/std/typecons.d(4043): Error: template instance
 >> isArray!(typeof(a)) template 'isArray' is not defined
 >> test.d(7): Error: mixin test.Foo.Proxy!(foo) error instantiating
 >> Failed: ["dmd", "-de", "-debug", "-w", "-v", "-o-", "test.d", "-I."]
 >>
 >> Can anyone else confirm or am i doing something wrong. I'm using DMD
 >> 2.066.0 64bit Ubuntu 14.04.
 >
 > It stopped working after this PR was merged:
 >
 > https://github.com/D-Programming-Language/phobos/pull/1899
 >
 > But I suspect that something else is going on. The PR only introduced
 > the call to `isArray` into `std.typecons.Proxy`.

It can be explained if the mixed-in template is evaluated at the mixin 
context without bringing in the imported modules to that context. I 
don't know whether it is true or whether it is a known limitation.

Ali



More information about the Digitalmars-d-learn mailing list