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