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
Comment #2 by dlang-bugzilla — 2014-04-18T11:20:07Z
Comment #3 by k.hara.pg — 2014-04-18T14:08:13Z
Comment #4 by github-bugzilla — 2014-04-19T18:15:38Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/54f752a9bfdfada22c1a8a7b70eeafd205f7f9b0 fix Issue 12591 - std/typecons.d(440): Error: tuple has no effect in expression https://github.com/D-Programming-Language/dmd/commit/4d58a577e34c41ca17b4130ec8ad4dbe4a124b24 Merge pull request #3468 from 9rnsr/fix12591 [REG2.064] Issue 12591 - std/typecons.d(440): Error: tuple has no effect in expression