D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21653 - Inheriting from an interface then a class generates a wrong error
Summary: Inheriting from an interface then a class generates a wrong error
Status: RESOLVED DUPLICATE of issue 21883
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: industry, rejects-valid
Depends on:
Blocks:
 
Reported: 2021-02-22 02:32 UTC by Mathias LANG
Modified: 2021-05-03 09:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mathias LANG 2021-02-22 02:32:32 UTC
```
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 Mathias LANG 2021-05-03 09:17:40 UTC

*** This issue has been marked as a duplicate of issue 21883 ***