[Issue 12078] New: forward reference issue with is() and curiously recurring template pattern

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 5 00:37:35 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12078

           Summary: forward reference issue with is() and curiously
                    recurring template pattern
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at benjamin-thaut.de


--- Comment #0 from Benjamin Thaut <code at benjamin-thaut.de> 2014-02-05 00:37:34 PST ---
In the following repro case, the first static assert will fail, but if you
comment it, the second one will succeed.

class Base(T)
{
  static assert(is(T : Base!T), "not related");
}

class Derived : Base!Derived
{
}

void main(string[] args)
{
  static assert(is(Derived : Base!Derived), "not related 2");
}

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


More information about the Digitalmars-d-bugs mailing list