www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20861] New: Interface implementations are not checked when

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

          Issue ID: 20861
           Summary: Interface implementations are not checked when code
                    gen is skipped
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: doob me.com

The following code should fail to compile but doesn't when code gen is skipped,
i.e. the `-o-` flag is used:

interface Foo
{
    void foo();
}

class Bar : Foo
{

}

The reason being that the check if a class implements all methods of an
interface is performed when generating code for the vtable.

--
May 24