D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6273 - Tuple [] operator in pure function
Summary: Tuple [] operator in pure function
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2011-07-08 17:43 UTC by bearophile_hugs
Modified: 2012-04-24 17:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-07-08 17:43:18 UTC
With DMD 2.054beta this program:


import std.typecons;
void main() pure {
    int x = tuple(0)[0];
}


Gives:
temp.d(3): Error: no [] operator overload for type Tuple!(int)
Comment 1 SomeDude 2012-04-24 13:34:13 UTC
compiles fine with 2.059 Win32