[Issue 18432] alias x = x where x is an imported symbol should result in an error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 15 18:43:48 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18432
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to RazvanN from comment #1)
> Actually,
>
> import std.stdio : writeln;
> alias writeln = std.stdio.writeln;
>
> Does not compile successfully, it issues an error : "Undefined identifier
> std.stdio.writeln".
This one works (or rather fails) as expected. Importing using selective imports
does not pull in the fully qualified name to the namespace.
I'm not 100% sure on the first one, as it seems like if it works, it's simply a
no-op. Can you give a reason why having it succeed is bad?
--
More information about the Digitalmars-d-bugs
mailing list