[Issue 4654] Cannot overload range iteration against opApply iteration

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Oct 31 14:53:43 PDT 2015


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

Infiltrator <lt.infiltrator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lt.infiltrator at gmail.com

--- Comment #1 from Infiltrator <lt.infiltrator at gmail.com> ---
The issue is that the opApply delegate takes three ints, so obviously it won't
compile if you pass only one.  I know that with AAs you can do both
foreach(value) and foreach(key,value); but I'm not sure how exactly that's
implemented.

Having said that, this bug report does highlight a problem with the error
message and it should stay open until it is fixed.

Current (2.068) message:
Error: cannot infer argument types, expected 3 arguments, not 1

As for what it should be, I don't really have any good suggestions.

--


More information about the Digitalmars-d-bugs mailing list