Bug 467 – double inheritance from the same interface

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-10-28T05:42:00Z
Last change time
2014-02-15T13:20:47Z
Keywords
accepts-invalid, spec
Assigned to
bugzilla
Creator
roel.mathys
Blocks
511

Comments

Comment #0 by roel.mathys — 2006-10-28T05:42:38Z
In the docs it says twice inheriting from the same interface is not allowed. But DMD accepts it and compiles it.
Comment #1 by roel.mathys — 2006-10-28T05:44:20Z
Example code: import std.stdio; interface C { void f(); } class CC : C,C { void f() { writefln("hello"); } } void main() { CC cc = new CC(); cc.f(); }
Comment #2 by thomas-dloop — 2006-11-08T09:38:54Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-10-28: > http://d.puremagic.com/issues/show_bug.cgi?id=467 > In the docs it says twice inheriting from the same interface is not allowed. > But DMD accepts it and compiles it. Added to DStress as http://dstress.kuehne.cn/nocompile/i/interface_26_A.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFUfR+LK5blCcjpWoRAgonAKCqVqjjuGAdYZqskW2lQZuMoUcfYwCcDun7 6DLERJqb/WPjfO3/OjNbINc= =PEln -----END PGP SIGNATURE-----
Comment #3 by matti.niemenmaa+dbugzilla — 2006-11-18T10:36:07Z
There's even a direct example of this in the spec, which DMD allows: interface D { void foo(); } class A : D, D // error, duplicate interface { } (Of course, this doesn't compile also since foo() isn't defined in A.)
Comment #4 by bugzilla — 2006-11-25T03:55:33Z
Fixed DMD 0.175