www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19990] New: unknown error with missing import


          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 puremagic.com
          Reporter: elpenguino+D gmail.com

module a;

struct A {
        import b : B;
        Nullable!bool z;
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

Jun 21 2019