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

           Summary: Forward reference in returning superclass from
                    template using is() expression (Breaks
                    std.traits.BaseTypeTuple)
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: kenn...@gmail.com
            Blocks: 340


--- Comment #0 from kenn...@gmail.com 2011-04-24 00:47:15 PDT ---
Test case:

------------------------
template J(A) {
    static if (is(A P == super))
        alias P J;
}

alias J!(A) Z;

class X {}
class A : X {}
------------------------
y.d(6): Error: forward reference to '(in X)'
------------------------

The template J is basically std.traits.BaseTypeTuple. Because of this bug, any
use of BaseTypeTuple!A before A is defined (not just X) will result in a
forward-reference bug.

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

Reply via email to