[Issue 538] New: Can't return an expression tuple from a function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 16 17:37:32 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=538
Summary: Can't return an expression tuple from a function
Product: D
Version: 0.174
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: wbaxter at gmail.com
You can't return an expression tuple from a function.
Right now, if you try to return one:
template Tuple(T...) { alias T Tuple; }
alias Tuple!(int,int) TType;
TType foo()
{
TType x; x[0] = 1; x[1] = 2;
return x;
}
You get the error:
"Error: cannot implicitly convert expression
(tuple((_x_field_0),(_x_field_1))) of type (int, int) to (int, int)"
--
More information about the Digitalmars-d-bugs
mailing list