[Issue 24627] New: Disallow qualifiers as member function attributes in prefix notation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 24 11:35:45 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24627
Issue ID: 24627
Summary: Disallow qualifiers as member function attributes in
prefix notation
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: qs.il.paperinik at gmail.com
Issue 4070 was rejected on the grounds of symmetry. My sense is that Walter’s
objections are invalid. There is precedent for asymmetry on function
declarations:
`ref` prefix-only.
Worse, `ref const int f() { }` really, really looks like `const` applies to the
return type.
If breakage is deemed too much, this can be done in the next edition of D
(assuming editions are being implemented). All prefix type constructors should
be applied to the return type. Everything that affects the function (or
function type) or the implicit this goes at the end as a (member) function
attribute.
--
More information about the Digitalmars-d-bugs
mailing list