Bug 12591 – [DMD|REG] std/typecons.d(440): Error: tuple has no effect in expression
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-18T06:56:00Z
Last change time
2014-04-19T18:15:39Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
monarchdodra
Comments
Comment #0 by monarchdodra — 2014-04-18T06:56:10Z
Not sure when it regeressed. Phobos regressed in 2.065. This is the test case:
//----
import std.container, std.typecons : tuple;
void main()
{
auto a = Array!int();
tuple(a, a);
}
//----
std/typecons.d(425): Error: tuple has no effect in expression (tuple(this._expand_field_0.__cpctor(_param_0)))
//----
I've reduced it to:
//----
struct S(T) //MUST BE TEMPLATE!
{
this(this)
{}
}
void main()
{
alias T1 = Tup!(S!int);
}
struct Tup(Types...)
{
Types expand;
this(Types values)
{
expand[] = values[];
}
}
//----
Error: tuple has no effect in expression (tuple(this._expand_field_0.__cpctor(_param_0)))
//----
This started failing as of 2.064.
Comment #1 by dlang-bugzilla — 2014-04-18T11:10:07Z