Identifier resolution, the great implementation defined mess.

Sönke Ludwig via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 23:41:26 PDT 2014


Am 21.09.2014 07:29, schrieb deadalnix:
> On Friday, 19 September 2014 at 10:59:24 UTC, Dicebot wrote:
>> Yeah this is exactly what I was asking about. I assumed that
>> deadlnix has done some research about it and found some specific
>> inconsistencies / issues - after all, it is not the only
>> implementation-defined feature he must have encountered :)
>
> DMD does very bizarre things. I think I should write a DIP, but time is
> always running low...
>
> Free goodie: when you import, all symbol are resolved via the expected
> import resolution mechanism. All ? No, the root package is imported in
> the local scope.
>
> foo(int a) {
>    import a.b.c;
>    // a is now a package and not the parameter a anymore.
> }

There are also funny little things like this one:
http://dpaste.dzfl.pl/aac84d5ffae8



More information about the Digitalmars-d mailing list