www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1544] New: Internal error: ..\ztc\cgcs.c 358 -- tuples and structs

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1544

           Summary: Internal error: ..\ztc\cgcs.c 358 -- tuples and structs
           Product: D
           Version: 1.021
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jarrett.billingsley gmail.com


struct Tup(T...)
{
        T values;
}

void foo(int x, float y)
{

}

Tup!(int, float) bar()
{
        return Tup!(int, float)(4, 5.6);
}

void main()
{
        foo(bar().values);
}

The issue is the call in main -- if it's changed to:

auto t = bar();
foo(t.values);

it compiles fine.


-- 
Oct 01 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1544


clugdbug yahoo.com.au changed:

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





This works in DMD 1.042.


-- 
May 07 2009