DMD 2.054: import std.typecons; Tuple!(int, "x") foo() pure { int y1 = foo().x; int y2 = foo()[0]; return typeof(return)(0); } void main() {} test.d(3): Error: pure nested function 'foo' cannot access mutable data '_field_field_0' test.d(4): Error: no [] operator overload for type Tuple!(int,"x")
Issue does not occur for me on head revision, DMD v2.064.
(In reply to comment #1) > Issue does not occur for me on head revision, DMD v2.064. Good. Closed.