Bug 24771 – apply qualifiers between `ref` and function name to return type

Status
NEW
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-09-19T12:32:25Z
Last change time
2024-12-13T19:37:24Z
Assigned to
No Owner
Creator
Bolpat
Moved to GitHub: dmd#20513 →

Comments

Comment #0 by qs.il.paperinik — 2024-09-19T12:32:25Z
```d struct S { int[] x; ref const int[] f() => x; } ``` In the above snipped, `const` applies to the implicit `this` parameter of `f`. While prefix type qualifiers are widespread, qualifiers between `ref` and the basic type part of the return type are probably unlikely in both human written and generated code. Maybe we could interpret this the same as `ref const(int[])` instead.
Comment #1 by robert.schadek — 2024-12-13T19:37:24Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20513 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB