[Issue 1287] New: Iterating over an array of tuples causes "glue.c:710: virtual unsigned int Type::totym(): Assertion `0' failed."
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 23 12:42:03 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1287
Summary: Iterating over an array of tuples causes "glue.c:710:
virtual unsigned int Type::totym(): Assertion `0'
failed."
Product: D
Version: 1.016
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: onlystupidspamhere at yahoo.se
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.
--
More information about the Digitalmars-d-bugs
mailing list