[Issue 17447] New: ref void return should be an error
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 27 20:33:34 PDT 2017
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: nobody at puremagic.com
Reporter: code at 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.
--
More information about the Digitalmars-d-bugs
mailing list