www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23685] New: Confusing error with mutual imports

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

          Issue ID: 23685
           Summary: Confusing error with mutual imports
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

$ cat a.d
import b : bSym;
$ cat b.d
import a;
$ dmd -o- a.d
a.d(1): Error: module `b` import `bSym` not found, did you mean alias `a.bSym`?


This is one of those "wtf" moments for users. What alias? I reckon it's because
of the implementation of selective import lowering to aliases, but that's an
internal detail that shouldn't be leaking to users.

--
Feb 11 2023