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! }
https://github.com/D-Programming-Language/dmd/pull/776
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