September 25, 2019 [Issue 20243] New: inout not substituted for in associative array key type | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20243 Issue ID: 20243 Summary: inout not substituted for in associative array key type Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: rightfold+bugzilla+dlang@gmail.com 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. -- |
Copyright © 1999-2021 by the D Language Foundation