www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8990] New: Forward reference error on three structs

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990

           Summary: Forward reference error on three structs
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: cbkbbejeap mailinator.com
            Blocks: 340



22:05:34 PST ---
From digitalmars.D.learn:
http://forum.dlang.org/thread/mzssmbjertutrdgmrlyw forum.dlang.org

struct A(T)
{
    T t;
}
struct B(T)
{
    A!(T)* a;
}
struct C
{
    B!(C)* b;
}

Result:
test.d(2): Error: struct test.A!(C).A has forward references
test.d(11): Error: template instance test.B!(C) error instantiating

Workaround:
Inside the definition of "struct B(T)", move "A!(T)" to an optional template
parameter:

struct B(T, U=A!(T))
{
    U* a;
}



-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 09 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990


Rob T <alanb ucora.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alanb ucora.com



 

Also appears to be related, if not identical, to this one http://d.puremagic.com/issues/show_bug.cgi?id=3834 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990





 

Also appears to be related, if not identical, to this one http://d.puremagic.com/issues/show_bug.cgi?id=3834
-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990




Yes, looks identical to bug 6969 to me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 12 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/1280

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 13 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990




08:31:51 PST ---
 Don: FWIW, The reason I wasn't sure if this was the same was because if you

But, of course, Hara's pull apparently fixes both, so all the better :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 13 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/821fddfcd8188cf28ce379cdcf537fb2931a1d3d
fix Issue 8990 - Forward reference error on three structs

https://github.com/D-Programming-Language/dmd/commit/c34c5fb0e67f7c48bb683ef409378fde6db33088


Issue 6969 & 8990 - Forward reference error between three template
instantiations

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 13 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8990


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 13 2012