www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22790] New: ref-return-scope is always ref-return, scope,

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 puremagic.com
          Reporter: bugzilla 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.

--
Feb 18 2022