www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24176] New: Parameters of opApply delegate don't have to be

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

          Issue ID: 24176
           Summary: Parameters of opApply delegate don't have to be `ref`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: nick geany.org

The spec should be clearer on that.
Also a `ref` parameter of the delegate can accept non-ref foreach variables.

PR incoming.

--
Oct 06 2023