[Issue 21539] [REG 2.084] symbols from import inside template mixin cannot be accessed using module scope dot operator
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 11 07:18:50 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21539
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
This gets a little curiouser:
extern (C++, Nspace) {
enum Sid = 3;
}
mixin template T() {
alias A = .Sid; // ok as expected
alias B = Nspace.Sid; // ok as expected
import std.stdio;
alias X = .File; // fails
}
mixin T;
as the looking up of a member of Nspace should follow exactly the same rules as
looking up a name in a module.
--
More information about the Digitalmars-d-bugs
mailing list