Bug 21653 – Inheriting from an interface then a class generates a wrong error

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-02-22T02:32:32Z
Last change time
2021-05-03T09:17:40Z
Keywords
industry, rejects-valid
Assigned to
No Owner
Creator
Mathias LANG

Comments

Comment #0 by pro.mathias.lang — 2021-02-22T02:32:32Z
``` 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 ```
Comment #1 by pro.mathias.lang — 2021-05-03T09:17:40Z
*** This issue has been marked as a duplicate of issue 21883 ***