On Tuesday, 23 September 2014 at 19:18:08 UTC, H. S. Teoh via
Digitalmars-d wrote:
But this would cause a compile error:
----mod.d----
module mod;
string x, y;
----main.d----
void main() {
int x, y, z;
import mod;
x++; // Error: ambiguous symbol 'x', could be local
// variable 'x' or mod.x
}
T
How do you disambiguate to say "the x I want is the local one" ?
IMO, simply make it that local imports work like global ones, but
scoped. Global imports don't have this issue, why should local
imports have special rules?