[Issue 15042] New: [REG2.068] isInstanceOf fails when a template argument is an instance of the tested template

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 11 11:58:11 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15042

          Issue ID: 15042
           Summary: [REG2.068] isInstanceOf fails when a template argument
                    is an instance of the tested template
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: Marco.Leise at gmx.de

I have a templated struct that emits an error when you pass in something else
than "void" or another instance of itself. The following worked with 2.067, but
fails with 2.068.1:

------------------------

import std.traits;

struct RC(Parent)
{
    static assert (is(Parent == void) || isInstanceOf!(RC, Parent), "This used
to compile in 2.067");
}

alias Regression = RC!(RC!(void));

------------------------

--


More information about the Digitalmars-d-bugs mailing list