www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1287] New: Iterating over an array of tuples causes "glue.c:710: virtual unsigned int Type::totym(): Assertion `0' failed."

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: onlystupidspamhere 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.


-- 
Jun 23 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1287






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.


-- 
Jun 28 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1287


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007