Bug 1287 – Iterating over an array of tuples causes "glue.c:710: virtual unsigned int Type::totym(): Assertion `0' failed."

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Linux
Creation time
2007-06-23T14:42:00Z
Last change time
2014-02-16T15:22:25Z
Assigned to
bugzilla
Creator
onlystupidspamhere

Comments

Comment #0 by onlystupidspamhere — 2007-06-23T14:42:01Z
Code: class C(T...) { void a(T[] o) { foreach(p; o) int a = 1; } } alias C!(int) foo; Compiler output: Error: no size for type (int) dmd: glue.c:710: virtual unsigned int Type::totym(): Assertion `0' failed. ---- The foreach(p; o) should be able to return the elements of the array which are tuples.
Comment #1 by bugzilla — 2007-06-28T15:22:16Z
It's not possible to have a dynamic array of tuples as a function parameter type. Having an assert message is a bug, however, and I'll fix that.
Comment #2 by bugzilla — 2007-07-01T14:08:57Z
Fixed DMD 1.018 and DMD 2.002