Bug 19583 – Should report function modifiers in from as errors or at least warnings

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-01-14T17:54:13Z
Last change time
2024-12-13T19:01:59Z
Assigned to
No Owner
Creator
Victor Porton
Moved to GitHub: dmd#19526 →

Comments

Comment #0 by porton — 2019-01-14T17:54:13Z
Functions modifiers in front of the function should be reported as warnings or even errors. class X { const int* f() { return null; } // should give a compiler warning int* g() const { return null; } } In the above code it is too easy to confuse it with const(int*). This is VERY unreliable and should be warned loudly when somebody does this.
Comment #1 by robert.schadek — 2024-12-13T19:01:59Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19526 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB