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