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
++=
appendAssign operator (#7346)
#7354
Conversation
Please write tests. Just copy-paste the |
Thanks for the PR! Agreed with @webbedspace that this needs some tests. |
cd9d31b
to
c9db88e
Compare
c9db88e
to
e08ac8d
Compare
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.
Your code and tests look good to me!
I think constraining the type of a mutable variable to the one at assignment time sounds less surprising, but the question is if for this the list should be opaque with the inner type erased (
|
I agree, this seems like the right behaviour to me.
I think |
I think this could use another test checking that the case above ( |
append_assign tests test type mismatch
e08ac8d
to
82589e1
Compare
I added this case, I didn't do it before because I thought this should not result in error. Thank you both for explaining your thoughts |
Thanks for another great PR! |
Description
Closes #7346
Tests + Formatting