Bug 10458 – tuple of struct with unused member function
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-23T23:21:00Z
Last change time
2014-04-24T12:12:33Z
Assigned to
nobody
Creator
callumenator
Comments
Comment #0 by callumenator — 2013-06-23T23:21:38Z
http://forum.dlang.org/thread/[email protected]
DMD 2.063
Ali Çehreli's test case:
import std.typecons;
struct S
{
int x;
// Bizarre: Comment-out this function to pass the assert in main.
Tuple!(S) unused()
{
return tuple(S(7));
}
}
void main()
{
auto s = S(8);
assert(tuple(s).expand[0] == S(8));
}
Comment #1 by andrej.mitrovich — 2014-04-24T12:12:33Z