[Issue 21539] New: [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
Sun Jan 10 14:46:17 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21539

          Issue ID: 21539
           Summary: [REG 2.084] symbols from import inside template mixin
                    cannot be accessed using module scope dot operator
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: schveiguy at gmail.com

Normally, the dot operator finds symbols at module scope, even when imported
from other modules. However, if the import is done inside a template mixin, the
dot operator does not find the symbol.

Regression since 2.084

example:

mixin template T()
{
   import std.stdio;
   alias X = .File;
}

mixin T;

Error: undefined identifier `File` in module `onlineapp`

--


More information about the Digitalmars-d-bugs mailing list