https://issues.dlang.org/show_bug.cgi?id=3444

Simen Kjaeraas <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |[email protected]
         Resolution|FIXED                       |---

--- Comment #5 from Simen Kjaeraas <[email protected]> ---
Really? Cause this fails to compile for me:

unittest {
    import std.range, std.stdio;
    foreach (i, e; 100.iota)
        writeln(i, ": ", e);
}

Error: cannot infer argument types, expected 1 argument, not 2

Adding types for i and e, or using ranges other than iota, don't seem to change
the result. This is on DMD 2.078.2 on Windows.

There's a workaround in std.range.enumerate. If that's the implementation you
refer to, please include that information. If there's an implementation of this
in an upcoming DMD release, please include that information.

--

Reply via email to