Bug 13011 – inout delegate parameter cannot receive exactly same type argument

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-30T15:08:00Z
Last change time
2014-08-22T08:04:02Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2014-06-30T15:08:44Z
Test case: size_t hashOf(int delegate() inout val) { return 0; } void main() { int delegate() inout dg; auto h = hashOf(dg); } Output: test.d(8): Error: cannot implicitly convert expression (dg) of type int delegate() inout to int delegate() const
Comment #1 by k.hara.pg — 2014-06-30T15:17:04Z
Comment #2 by k.hara.pg — 2014-07-02T02:34:34Z
Comment #3 by github-bugzilla — 2014-07-08T01:24:59Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4f26498485369c38117ce1b3d11cb84b91fc3d1a Merge pull request #3707 from 9rnsr/fix13011 Issue 13011 - inout delegate parameter cannot receive exactly same type argument
Comment #4 by github-bugzilla — 2014-08-22T08:04:02Z