www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22108] New: DIP1000 parameter mistakenly interpreted as


          Issue ID: 22108
           Summary: DIP1000 parameter mistakenly interpreted as return
                    scope instead of scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

This should fail to compile with dip1000:

  ref int test(ref scope return int* p)
     return *p;

p should be 'return ref` and `scope`, but the compiler interprets it as `ref`
and `return scope` and passes it.

Jul 06 2021