With -preview=rvaluerefparam, this raises an error: ```D int toString(Writer)(ref Writer sink) => 3; int toString(void delegate(scope const(char)[]) sink) => 4; void put() {} pragma(msg, toString(dst => put())); ``` ``` onlineapp.d(1): Error: cannot have parameter of type `void` 4 ``` The error from trying to instantiate toString with `Writer = void` should be ignored since that overload isn't picked.
@dkorpel created dlang/dmd pull request #17096 "Fix bugzilla 24883 - Speculative template overload error escapes with…" fixing this issue: - Fix bugzilla 24883 - Speculative template overload error escapes with `-preview=rvaluerefparam` https://github.com/dlang/dmd/pull/17096
dlang/dmd pull request #17096 "Fix bugzilla 24883 - Speculative template overload error escapes with…" was merged into master: - 6080c191001b0a7400b804e56ba391ddee800474 by Dennis Korpel: Fix bugzilla 24883 - Speculative template overload error escapes with `-preview=rvaluerefparam` https://github.com/dlang/dmd/pull/17096