[Issue 22790] New: ref-return-scope is always ref-return, scope, unless return-scope appear in that order

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 19 00:49:25 UTC 2022


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

          Issue ID: 22790
           Summary: ref-return-scope is always ref-return, scope, unless
                    return-scope appear in that order
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

The rules around does ref-return-scope mean ref-return scope or does it mean
ref return-scope turned out to be confusing and intractable. So I'm changing it
to:

ref-return-scope means:
    ref-return scope
unless:
    "return scope" in that order appears in the source code.

This should handle all the desired cases.

But it breaks backwards compatibility. So it'll be put behind the
-preview=dip1000 switch.

--


More information about the Digitalmars-d-bugs mailing list