Reading ELF Files
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon May 5 06:51:13 PDT 2014
On 5/5/2014 8:17 PM, "Nordlöw" wrote:
>
>
> One thing though: You cannot call a filename the same as a keyword:
> package.d because
>
> import elf.package;
>
> fails with
>
> fs.d(144,12): Error: identifier expected following package
>
Actually, package.d is a feature which was added not so long ago. Given:
- foo
-- bar.d
-- baz.d
-- package.d
Where package.d looks like:
module foo.package;
public import foo.bar, foo.baz;
In client code, you can do this:
import foo;
And all of foo.bar and foo.baz will be visible. But you are correct that
one cannot explicitly import 'foo.package'
More information about the Digitalmars-d-learn
mailing list