Bug when overload function in multiple modules?

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 27 13:48:51 PDT 2014


On 08/27/2014 07:38 AM, Lemonfiend wrote:
> I get:
> src\app.d(19): Error: None of the overloads of 'foo' are callable using
> argument types (C3), candidates are:
> src\app.d(28):        main.foo(C1 c)
> src\app.d(38):        main.foo(C2 c)
>
> It does work when I explicitly import c3.foo.
>
> --- file app.d
> module app;
>
> import std.stdio;
>
> import c3;
> //import c3:foo; //uncomment this and it works

I think it is the protection against function hijacking:

   http://dlang.org/hijack.html

Ali



More information about the Digitalmars-d-learn mailing list