Bug 13063 – `enum` is allowed as storage class for functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-07T07:26:26Z
Last change time
2023-07-14T11:40:03Z
Keywords
accepts-invalid, pull
Assigned to
No Owner
Creator
Denis Shelomovskii

Comments

Comment #0 by verylonglogin.reg — 2014-07-07T07:26:26Z
This code compiles but shouldn't: --- enum void f1() { } enum f2() { } // works like `auto` ---
Comment #1 by verylonglogin.reg — 2014-07-07T07:36:50Z
Also note this syntax is already used by mistake [1] probably because of recent compiler changes rejecting meaningless `const`/`immutable` attributes. Also this currently compiles too because of Issue 13064: --- auto enum void f(); --- [1] https://github.com/andersonpd/eris/commit/85637587c8f154a3d50360e66a29f08c5586d1b3
Comment #2 by dlang-bot — 2023-07-12T13:44:12Z
@ntrel created dlang/dmd pull request #15405 "Fix Issue 13063 - `enum` is allowed as storage class for functions" fixing this issue: - Fix Issue 13063 - `enum` is allowed as storage class for functions https://github.com/dlang/dmd/pull/15405
Comment #3 by dlang-bot — 2023-07-14T11:40:03Z
dlang/dmd pull request #15405 "Fix Issue 13063 - `enum` is allowed as storage class for functions" was merged into master: - a0b455cf1a262ccff6c808c2d4c37236d8629dbc by Nick Treleaven: Fix Issue 13063 - `enum` is allowed as storage class for functions https://github.com/dlang/dmd/pull/15405