-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add function arity checking to calc example #431
Conversation
👷 Deploy Preview for salsa-rs processing.
|
✅ Deploy Preview for salsa-rs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Left one nit
self.report_error( | ||
expression.span, | ||
format!( | ||
"the function `{}` expects {expected_arity} argument(s), only {actual_arity} provided", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the function `{}` expects {expected_arity} argument(s), only {actual_arity} provided", | |
"the function `{}` expects {expected_arity} argument(s), but {actual_arity} provided", |
I think it would be better to change it to "but", because the actual_arity
may be more than the expected_arity
, as in your test sample below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for letting this sit so long, but this looks like a nice change!
This needs to be rebased before landing, any change you are still interested, @pervognsen ? Also, we're doing a renewed push around "Salsa 3.0" if you are still interested in doing more contribution. |
Going to close this since there has been so much activity! Still relevant though, let's come back to it. |
I'm starting to poke around Salsa 2022 and noticed the calc example's type checker doesn't validate the arity of function calls. Hopefully I'll be able to make more substantial contributions in the future when I get my bearings.