www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16607] New: [REG2.072b1] "forward reference" error with


          Issue ID: 16607
           Summary: [REG2.072b1] "forward reference" error with structs
                    nested in struct templates
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

//////// test.d ////////
struct A(T)
    T t;

    struct C

struct B
    A!(typeof(this))* a;

Compiler output:

test.d(5): Error: struct test.A!(B).A.C has forward references
test.d(12): Error: template instance test.A!(B) error instantiating

Introduced in https://github.com/D-Programming-Language/dmd/pull/5500

Oct 11 2016