Allow identical imports

Kenji Hara k.hara.pg at gmail.com
Tue Jul 30 07:30:51 PDT 2013


2013/7/30 Dicebot <public at dicebot.lv>

> On Tuesday, 30 July 2013 at 12:29:00 UTC, Daniel Murphy wrote:
>
>> Please file a bug report: http://d.puremagic.com/issues/
>>
>
> I don't think it is a bug, enhancement request for error message at most.
>

Currently selective import *implicitly* creates alias declaration for each
picked up names, and two equivalent selective import will make two alias
declarations implicitly, then they conflict each other.

import std.conv : to;
import std.conv : to;

is mostly same as:

import std.conv;
alias to = std.conv.to;
alias to = std.conv.to;  // conflict with the first alias

I think it's a not good compiler implementation detail and unnecessary
intrusive behavior.
Now I'm proposing to fix import mechanism in here.
https://github.com/D-Programming-Language/dmd/pull/2256

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130730/a4471f86/attachment.html>


More information about the Digitalmars-d mailing list