-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Syntax for defining custom errors. #10987
Conversation
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.
Tests are failing.
c964b90
to
04b0326
Compare
|
19ad0b3
to
37b4972
Compare
Ah great, thanks! |
@@ -0,0 +1,3 @@ | |||
error E(uint[] memory); | |||
// ---- | |||
// ParserError 2314: (15-21): Expected ',' but got 'memory' |
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.
This error message is rather confusing. Not sure if improving this is easy.
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.
Can be merged after squashing the last commit.
We should discuss on Wednesday if we want to merge this already. |
c019d7b
to
d31bd77
Compare
4b8159f
to
b4ba6d1
Compare
b4ba6d1
to
ae5fa34
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 haven't found anything serious. Pretty much only minor/stylistic tweaks and test case suggestions.
The only other thing is that I noticed that we allow @return
for events and have assertions about their return arguments. I thought events do not have those?
There are also some unresolved TODOs but given that there are more PRs on top of this, they might be fine.
test/libsolidity/syntaxTests/errors/clash_function_error_inheritance.sol
Show resolved
Hide resolved
4438a59
to
d0cec87
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 think this is ready now.
There's still one pending question where I'd like to get an answer but it's about events, not errors so there's no reason for it to block this PR: #10987 (comment)
d0cec87
to
b04b189
Compare
Split out of #10922
Added the check for reserved signatures, but I'm still looking for an example for the all-ones-signature.