[Issue 11794] Compilation fails with a certain selective import

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 22 01:18:05 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11794


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-12-22 01:18:03 PST ---
(In reply to comment #0)
> I'm not sure whether this is a problem with my code or a bug.

I think it's a duplicate report, I've seen this before. When you use selective
imports you cannot use the fully qualified name of the symbol, e.g.:

-----
import std.stdio : writeln;

void main()
{
    std.stdio.writeln("foo");  // error
}
-----

This is by design.

However, for some reason "std.conv" is available when you import std.stdio, but
I think this is a dupe report. Here's the accepts-invalid test case:

-----
import std.stdio;

void main()
{
    std.conv.to!int("1");  // this should be an error..
}
-----

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list