[Issue 4503] New: forward reference to aliased template instance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 24 11:42:01 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4503

           Summary: forward reference to aliased template instance
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2010-07-24 11:41:59 PDT ---
This is an extremely simplified version of my real code (cl4d) where these 3
parts are distributed among several files (and thus heavily depend on the build
order).

----

class Collection(T)
{
}
ICollection c;

alias Collection!int ICollection;

fwdref2.d(4): Error: forward reference to 'Collection!(int)'
fwdref2.d(4): Error: ICollection is used as a type

----

Putting ICollection c; at the end makes it compile.

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


More information about the Digitalmars-d-bugs mailing list