Bug 12638 – Void can be ref

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-24T20:33:40Z
Last change time
2022-08-22T14:55:40Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
Temtaime
See also
https://issues.dlang.org/show_bug.cgi?id=3934

Comments

Comment #0 by temtaime — 2014-04-24T20:33:40Z
ref foo() {} And ref void foo() {} Compiles ok, but shouldn't i think.
Comment #1 by mxfomin — 2014-08-14T06:24:23Z
This is a particular case of nonsense attributes. The biggest pile is an issue 3934
Comment #2 by razvan.nitu1305 — 2022-08-22T14:55:40Z
Quoting Mathias's argument from Issue 3934 (which was closed as invalid): "DMD being lax, while unsettling to some, is also great for generic code. There are quite a lot of cases where DMD being stricter would result in worst code because it would require some special casing in generic code." Closing as invalid.