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

          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: nob...@puremagic.com
          Reporter: c...@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
address.
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.

--

Reply via email to