Bug 7769 – relax inout rule doesn't work for template function

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-24T23:29:00Z
Last change time
2012-03-25T20:35:42Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-03-24T23:29:44Z
In 2.059head, inout rule was relaxed properly. Therefore, following code should work. void f(K)(inout(K) value){} void main() { f("abc"); } But it raisees errors: Error: template test.f(K) does not match any function template declaration Error: template test.f(K) cannot deduce template function from argument types !()(string)
Comment #1 by k.hara.pg — 2012-03-24T23:53:12Z
Comment #2 by github-bugzilla — 2012-03-25T19:21:09Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e68a5ec7e0d44c7ebc8b19aa646f14ecab436495 Merge pull request #840 from 9rnsr/fix7769 Issue 7769 - relax inout rule doesn't work for template function