digitalmars.D.bugs - [Issue 21653] New: Inheriting from an interface then a class
- d-bugmail puremagic.com (29/29) Feb 21 2021 https://issues.dlang.org/show_bug.cgi?id=21653
https://issues.dlang.org/show_bug.cgi?id=21653 Issue ID: 21653 Summary: Inheriting from an interface then a class generates a wrong error Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: industry, rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: pro.mathias.lang gmail.com ``` interface A {} class C { int a; } class Works : C, A {} class Doesnt : A, C {} ``` This seems like a pointless limitation. It produces the following error: ``` multi.d(5): Error: multi.Doesnt: multiple class inheritance is not supported. Use multiple interface inheritance and/or composition. multi.d(5): multi.C has fields, consider making it a member of multi.Doesnt ``` --
Feb 21 2021