Bug 12177 – inout(Cycle!(string[2])) implicit cast problem
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-02-15T03:32:00Z
Last change time
2014-02-17T23:44:02Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2014-02-15T03:32:49Z
I think this used to work until recently:
void main() {
import std.range;
foreach (s; recurrence!q{a[n - 1] ~ a[n - 2]}("1", "0")) {}
}
With DMD 2.065beta3 gives:
..\dmd2\src\phobos\std\range.d(4424,21): Error: cannot implicitly convert expression ((nothrow Cycle!(string[2]) __ctmp1475 = 0;
, __ctmp1475).this(*cast(string[2]*)this._ptr, this._index + i)) of type Cycle!(string[2]) to inout(Cycle!(string[2]))
Comment #1 by dlang-bugzilla — 2014-02-15T09:22:51Z