[Issue 19990] New: unknown error with missing import

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 21 07:05:06 UTC 2019


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

          Issue ID: 19990
           Summary: unknown error with missing import
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com

a.d:
```
module a;

struct A {
        import b : B;
        Nullable!bool z;
}
```
b.d:
```
module b;

import std.typecons : Nullable;

struct B {
        import a : A;
        A[] a;
}

Nullable!B b() {
        return Nullable!B.init;
}
```

Not only does this cause a useless error message, but changing the `import b :
B` to `import b` causes this to compile successfully when it probably
shouldn't.

--


More information about the Digitalmars-d-bugs mailing list