Allow identical imports

bearophile bearophileHUGS at lycos.com
Tue Jul 30 05:09:35 PDT 2013


JS:

> I have ctfe generated code which requires generating import 
> statements so symbols can be looked up(avoiding the need to 
> have to manually import modules).
>
> 1. Allow identical import statements not throw an error.
> import std.conv : to;
> import std.conv : to;
>
> throws error
>
> Error	1	Error: alias main.to conflicts with alias main.to at 
> main.d(5)
>
> such errors make it difficult to write generated code with weak 
> state information(since ctfe's can store global state data.

That's untidy. Such things later bite your rump.

Bye,
bearophile


More information about the Digitalmars-d mailing list