www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23240] New: dmd compiles 'ok' class invalid to interface if


          Issue ID: 23240
           Summary: dmd compiles 'ok' class invalid to interface if class
                    contains abstract members
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: animuspexus protonmail.com

following code compiles ok, but it shouldn't: interface doesn't match.

this bug doesn't work if there are no abstract member in class.

import std.stdio;

interface ClassInterface
    ClassInterface setValue(string val);

class ClassPrototype : ClassInterface
    string value;

    void setValue(string val)
        value = val;

    abstract void doSomething();

class Class : ClassPrototype
    override void doSomething()

void main()
    auto inst = new Class();


Jul 11 2022