nim-works / nimskull

An in development statically typed systems programming language; with sustainability at its core. We, the community of users, maintain it.
https://nim-works.github.io/nimskull/index.html
Other
279 stars 39 forks source link

reject overloads that require conversion in `var` position #1420

Closed zerbina closed 3 months ago

zerbina commented 3 months ago

Summary

Details

The checkConstraint template is only called with operand, which is the operand before fixup (e.g., introduction of implicit conversions), hence the isLValue test not failing.

arg (the operand after fixup) is now passed to isLValue, so that implicit conversions are taken into account.

saem commented 3 months ago

/merge

github-actions[bot] commented 3 months ago

Merge requested by: @saem

Contents after the first section break of the PR description has been removed and preserved below:


## Notes for Reviewers * discovered and reported by @alaviss on Matrix * the error message is still not as clear as it should be, but that's now a problem of `cli_reporter`