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
275 stars 39 forks source link

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

Closed zerbina closed 1 month ago

zerbina commented 1 month 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 1 month ago

/merge

github-actions[bot] commented 1 month 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`