Bug 2988 – Chain needs opIndexAssign.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-05-15T19:47:00Z
Last change time
2015-06-09T01:27:59Z
Assigned to
andrei
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2009-05-15T19:47:42Z
import std.range; void main() { uint[] foo = [1,2,3,4,5]; uint[] bar = [1,2,3,4,5]; auto c = chain(foo, bar); c[3] = 3; } Errors: test7.d(7): Error: operator [] assignment overload with opIndex(i, value) illegal, use opIndexAssign(value, i) test7.d(7): Error: function std.range.ChainImpl!(uint[],uint[]).ChainImpl.opIndex (uint index) does not match parameter types (int,int) test7.d(7): Error: expected 1 arguments, not 2 for non-variadic function type ref uint(uint index)