www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22482] New: imported package shadow local variable


          Issue ID: 22482
           Summary: imported package shadow local variable
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: deadalnix gmail.com

void foo(C)(ref C config) {
        // Do stuff

        import config.somemodule;

Error: undefined identifier `extends` in package `config`

This does not sound reasonable to me. The package should not take precedence
over local variable.

Nov 04 2021