www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17181] New: Local imports in templates should be added to

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 puremagic.com
          Reporter: bugzilla 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.

--
Feb 14 2017