Re: meaning import order?

2011-11-14 Thread Nick Sabalausky
"Alexey Veselovsky"  wrote in message 
news:mailman.928.1321256527.24802.digitalmar...@puremagic.com...
> =
> $ cat main.d
> import std = std.stdio;
> import std.socket;
> import std.array;
> import std.getopt;
>
> void main() { std.writeln("bar");}
> ==
>
> compiles ok. But:
>
> import std.socket;
> import std.array;
> import std.getopt;
> import std = std.stdio;
>
> void main() { std.writeln("bar");}
>
> $ dmd main.d
> main.d(6): Error: undefined identifier package std.writeln
>
> wtf?

Looks like a bug, you should file it at http://d.puremagic.com/issues/

It might have something to do with an existing bug with renamed imports.




meaning import order?

2011-11-13 Thread Alexey Veselovsky
=
$ cat main.d
import std = std.stdio;
import std.socket;
import std.array;
import std.getopt;

void main() { std.writeln("bar");}
==

compiles ok. But:

import std.socket;
import std.array;
import std.getopt;
import std = std.stdio;

void main() { std.writeln("bar");}

$ dmd main.d
main.d(6): Error: undefined identifier package std.writeln

wtf?