[Issue 12591] New: [DMD|REG] std/typecons.d(440): Error: tuple has no effect in expression
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 17 23:56:10 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12591
Issue ID: 12591
Summary: [DMD|REG] std/typecons.d(440): Error: tuple has no
effect in expression
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: monarchdodra at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list