February 22, 2021 [Issue 21653] New: Inheriting from an interface then a class generates a wrong error | ||||
|---|---|---|---|---|
| ||||
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 ``` -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply