Identifier resolution, the great implementation defined mess.

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 22:29:23 PDT 2014


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.
}


More information about the Digitalmars-d mailing list