Bug 10468 – Regression (2.063): Lockstep no longer works with iota
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-24T15:02:00Z
Last change time
2013-06-25T03:50:37Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-06-24T15:02:45Z
-----
module test;
import std.range;
void main()
{
foreach (x, y; lockstep(iota(0, 10), iota(0, 10)))
{
}
}
-----
$ dmd test.d
C:\DMD\dmd2\windows\bin\..\..\src\phobos\std\range.d(4716): Error: delegate dg (ref int, ref int) is not callable using argument types (int, int)
test.d(6): Error: opApply() function for Lockstep!(Result, Result) must return an int
C:\DMD\dmd2\windows\bin\..\..\src\phobos\std\range.d(4717): Error: delegate dg (uint, ref int, ref int) is not callable using argument types (uint, int, int)
This is introduced as a result of my refactor pull, which added 'ref' to the parameter types by mistake:
https://github.com/D-Programming-Language/phobos/pull/1124
Comment #1 by andrej.mitrovich — 2013-06-24T15:05:37Z
(In reply to comment #0)
> This is introduced as a result of my refactor pull, which added 'ref' to the
> parameter types by mistake:
> https://github.com/D-Programming-Language/phobos/pull/1124
Actually scratch that, it seems to be more involved. When I simply remove 'ref' then I get errors in other places. I'll investigate more.
Comment #2 by andrej.mitrovich — 2013-06-24T15:17:43Z
(In reply to comment #1)
> (In reply to comment #0)
> > This is introduced as a result of my refactor pull, which added 'ref' to the
> > parameter types by mistake:
> > https://github.com/D-Programming-Language/phobos/pull/1124
>
> Actually scratch that, it seems to be more involved. When I simply remove 'ref'
> then I get errors in other places. I'll investigate more.
Ah I see what I've missed, the hasLvalueElements check. I'm making a pull shortly.
Comment #3 by andrej.mitrovich — 2013-06-24T15:18:34Z