-
Notifications
You must be signed in to change notification settings - Fork 161
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 RequireMutable #3391
Add RequireMutable #3391
Conversation
dbdf8e5
to
cdaf911
Compare
cdaf911
to
9a80320
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.
I like this PR and the fact that it simplifies the code.
I asked one question about the removed ErrorReturnVoid
, I just want to make sure it was a deliberate decision to change that behaviour, if so I’m happy to approve.
My only complaint is that the error messages have less information, but then again the error that is given corresponds exactly to the condition that is being tested. So fair enough.
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.
Generally a good thing! But some remarks (inspired by @wilfwilson )
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.
Given that @fingolfin explained my question to me, I approve the PR; if you want to add more information into the error messages, as discussed in the thread, then that would be welcome, but I don't insist on it.
9a80320
to
2b99ebe
Compare
Codecov Report
@@ Coverage Diff @@
## master #3391 +/- ##
==========================================
+ Coverage 85.15% 85.5% +0.35%
==========================================
Files 697 646 -51
Lines 344073 317133 -26940
==========================================
- Hits 292998 271168 -21830
+ Misses 51075 45965 -5110
|
2b99ebe
to
7486b1a
Compare
This patch got massively simplified :) But I think the messages are much better. Thanks for all feedback. I did keep the patch to remove the extra message, but I feel once we say "must be a mutable list", it's fine to then say "(not a ...)" |
151e034
to
64d7b53
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.
Nice! One minor remark, but merging as-is would be fine as well!
64d7b53
to
b13ebf9
Compare
b13ebf9
to
3cdf2c8
Compare
This adds the C function "RequireMutable".
This took more work than I planned, as I found errors of the type:
" must be mutable (not a ...)" a bit confusing, as for this error I found the "not a ..." bits misleading.