[Issue 17181] New: Local imports in templates should be added to imported modules list of module that instantiated it

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 14 13:11:34 PST 2017


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

          Issue ID: 17181
           Summary: Local imports in templates should be added to imported
                    modules list of module that instantiated it
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

Given:

  module foo;
  import bar;
  int foo() {
    return bar.abc(1);
  }

and:

  module bar;
  int abc()(int i) {
    import std.stdio;
    return i;
  }

std.stdio should be added to foo's list of imported modules.

--


More information about the Digitalmars-d-bugs mailing list