[Issue 3503] [module] Imports should be static by default
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 14 09:49:30 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3503
--- Comment #6 from Leandro Lucarella <llucax at gmail.com> 2009-11-14 09:49:29 PST ---
This is an example of how things should work if this bug and bug 3504 and bug
3505 gets implemented:
mod.d:
void f() {}
pkg/a.d:
void f() {}
pkg/pkg.d:
void f() {}
some/large/package/a_module.d:
void f() {}
x.d:
1 import mod: *; // doesn't introduce the symbol 'mod'
2 import pkg: *; // introduce the symbol 'pkg' but refering to pkg.pkg
3 import some.large.package.a_module; // introduce the symbol 'a_module'
4 static import some.large.package.a_module;
5
6 void main() {
7 f(); // mod.f (from line 1)
8 a.f(); // pkg.a.f (from line 2)
9 pkg.f(); // pkg.pkg.f (from line 2)
10 a_module.f(); // some.large.package.a_module (from line 3)
11 some.large.package.a_module.f(); // (from line 4)
12 }
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list