Bug 7950 – Type tuples are incorrectly flattened in base type list of interface

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-20T10:31:00Z
Last change time
2013-02-05T13:03:59Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
samukha

Comments

Comment #0 by samukha — 2012-04-20T10:31:13Z
Empty tuple in an interface's base type list should be legal as it is with classes. import std.typetuple; interface I {} // ok interface I2 : TypeTuple!() {} // ok interface I3 : TypeTuple!(I) {} // ok class A : I, TypeTuple!() {} // ok interface I4 : I, TypeTuple!() {} // fail Error: interface a.I4 base type must be interface, not ()
Comment #1 by samukha — 2012-04-20T10:50:16Z
Actually, the problem is with tuple flattening in general: class A2 : I, TypeTuple!(I2) {} // ok interface I5 : I, TypeTuple!(I2) {} // fail
Comment #2 by k.hara.pg — 2012-04-20T22:19:10Z
Comment #3 by github-bugzilla — 2012-04-22T15:54:53Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/af736632ff93aa5ac7d5c8cbbde78e3ad331313d fix Issue 7950 - Type tuples are incorrectly flattened in base type list of interface https://github.com/D-Programming-Language/dmd/commit/5787ab15f43c201168ba0b8a0e5d6f6503cb7623 Merge pull request #896 from 9rnsr/fix7950 Issue 7950 - Type tuples are incorrectly flattened in base type list of interface