Bug 7618 – delegate/function pointer call bypass parameter storage class

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-01T03:51:00Z
Last change time
2012-03-02T12:39:40Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-03-01T03:51:02Z
Test case: ---- void foo(const int x) { int func(ref int) { return 1; } func(x); // Error: function test.foo.func (ref int x) is not callable // using argument types (const(int)) / --> OK int delegate(ref int) dg = (ref int x) => 1; dg(x); // --> compiles without error, bad! int function(ref int) fp = (ref int x) => 1; fp(x); // --> compiles without error, bad! }
Comment #1 by k.hara.pg — 2012-03-01T04:12:51Z
Comment #2 by github-bugzilla — 2012-03-02T11:39:30Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/40b290c66756bce69369b188cad2cda1f3794777 fix Issue 7618 - delegate/function pointer call bypass parameter storage class https://github.com/D-Programming-Language/dmd/commit/f2eff281cbb950cf85b47dda943afcbde22964d4 Merge pull request #776 from 9rnsr/fix7618 Issue 7618 - delegate/function pointer call bypass parameter storage class