Automatic typing

Walter Bright newshound2 at digitalmars.com
Mon Jul 1 11:44:01 PDT 2013


On 7/1/2013 10:07 AM, Timon Gehr wrote:
> module b;
> int x;
>
> module a;
>
> void main(){
>      int x;
>      {
>          import b;
>          x = 2;

I'd encourage you to submit an enhancement request that would produce the message:

Error: import b.x hides local declaration of x

>      }
>      import std.stdio;
>      writeln(x); // prints 0
> }
>



More information about the Digitalmars-d mailing list