www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17447] New: ref void return should be an error


          Issue ID: 17447
           Summary: ref void return should be an error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

ref void foo()

void test()
    auto p = &foo();

Somewhat weird that it's allowed to return `ref void` and even take it's
Might be at odds with some generic programming, but wouldn't know an example
requiring this.
Also see the discussion in https://github.com/dlang/druntime/pull/1815.

May 27 2017