Beta D 2.071.0-b2

Rory McGuire via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Apr 3 13:47:12 PDT 2016


On Sun, Apr 3, 2016 at 1:59 PM, tost via Digitalmars-d-announce <
digitalmars-d-announce at puremagic.com> wrote:

> On Wednesday, 30 March 2016 at 11:03:51 UTC, Martin Nowak wrote:
>
>> Second beta for the 2.071.0 release.
>>
>> http://dlang.org/download.html#dmd_beta
>> http://dlang.org/changelog/2.071.0.html
>>
>> Please report any bugs at https://issues.dlang.org
>>
>> -Martin
>>
>
> //foo.d
> module foo;
>
> void main() {}
>
> class A {
>
>         void bar(int i) {}
>
>         void baz() {
>                 import othermodule;
>                 bar("abc");
>         }
> }
>
> // othermodule.d
> module othermodule;
>
> void bar(string s) {}
>
> compiled with
>
> dmd foo.d othermodule.d
>
> gives
>
> foo.d(11): Error: function foo.A.bar (int i) is not callable using
> argument types (string)
>
> is this a feature of the new name lookup algorithm or a bug? Adapting my
> codebase would be trivial :)
>

I think compiler is supposed to stop you from doing that to protect against
hijacking.
http://dlang.org/hijack.html

R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20160403/8363c2e4/attachment.html>


More information about the Digitalmars-d-announce mailing list