[Issue 21653] New: Inheriting from an interface then a class generates a wrong error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 22 02:32:32 UTC 2021
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 at puremagic.com
Reporter: pro.mathias.lang at 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
```
--
More information about the Digitalmars-d-bugs
mailing list