[Issue 611] New: IsExpression fails when inside implemented interface

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 27 07:57:26 PST 2006


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

           Summary: IsExpression fails when inside implemented interface
           Product: D
           Version: 0.175
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: daekharel at gmail.com


interface Interface(T) {
    static assert(is(T : Interface));
}

class Implementor : Interface!(Implementor) {}

-----
The above code generates the following error when compiling:

err.d(2): static assert  (is(Implementor : Interface)) is false

The assertion is self-evidently true; Implementor subtypes
Interface!(Implementor), so is(Implementor : Interface!(Implementor)) should be
true. This error occurs only when the assertion is contained within the
interface itself; if it is placed within the Implementor class definition or
outside, it compiles.


-- 




More information about the Digitalmars-d-bugs mailing list