[Issue 21184] New: Unimplemented methods of interface are not reported as errors during compilation.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 21 13:37:30 UTC 2020


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

          Issue ID: 21184
           Summary: Unimplemented methods of interface are not reported as
                    errors during compilation.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alexandru.ermicioi at gmail.com

Example:
--------
import std;

interface Promise {
    int doIt();
}

class Silly {
    int doIt();
}

void main()
{
    return new Silly().doIt();
}
--------

Expected:
To have a compiler error telling us that doIt is not implemented.

Actual:
Compiler happily accepts this, then fails at link time, with error about
missing implementation.

--


More information about the Digitalmars-d-bugs mailing list