Bug 17447 – ref void return should be an error

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-05-28T03:33:34Z
Last change time
2024-12-13T18:52:21Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#19255 →

Comments

Comment #0 by code — 2017-05-28T03:33:34Z
---- 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.
Comment #1 by robert.schadek — 2024-12-13T18:52:21Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19255 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB