Bug 20243 – inout not substituted for in associative array key type
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-09-25T18:31:50Z
Last change time
2024-05-26T20:29:47Z
Keywords
pull
Assigned to
No Owner
Creator
zopsicle
Comments
Comment #0 by zopsicle — 2019-09-25T18:31:50Z
DMD 2.87.
Example program:
// https://run.dlang.io/is/mIIhvc
void main()
{
inout(int) f(inout(int)[inout(string)] x);
const(int)[const(string)] x;
f(x);
}
Fails with error:
onlineapp.d(5): Error: function onlineapp.main.f(inout(int)[inout(string)] x) is not callable using argument types (const(int)[const(string)])
onlineapp.d(5): cannot pass argument x of type const(int)[const(string)] to parameter inout(int)[inout(string)] x
But I expect it to succeed, and substitute const for inout in the associative array key type.
Comment #1 by dlang-bot — 2024-05-26T18:26:29Z
@zopsicle created dlang/dmd pull request #16533 "Fix bugzilla issue 20243 - inout not substituted for in associative array key type" fixing this issue:
- Fix bugzilla issue 20243 - inout not substituted for in associative array key type
https://github.com/dlang/dmd/pull/16533
Comment #2 by dlang-bot — 2024-05-26T20:29:47Z
dlang/dmd pull request #16533 "Fix bugzilla issue 20243 - inout not substituted for in associative array key type" was merged into master:
- 8375897d9dc85615d1c128f2c284d8d2f22d5c74 by zopsicle:
Fix bugzilla issue 20243 - inout not substituted for in associative array key type
https://github.com/dlang/dmd/pull/16533