[Issue 21243] New: Allow lambdas to return auto ref

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 13 15:50:50 UTC 2020


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

          Issue ID: 21243
           Summary: Allow lambdas to return auto ref
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: snarwin+bugzilla at gmail.com

Nested functions (to which lambdas are lowered) already support this, so
lambdas should too.

This will make it possible to, for example, enclose an arbitrary expression in
a @trusted lambda without needing to check first whether the expression
evaluates to an lvalue or an rvalue.

--


More information about the Digitalmars-d-bugs mailing list