Fix named error parameter encoding order in IR codegen#16453
Fix named error parameter encoding order in IR codegen#16453nikola-matic wants to merge 3 commits intodevelopfrom
Conversation
01fe6b9 to
0f978ea
Compare
cameel
left a comment
There was a problem hiding this comment.
This needs a lot more tests and a bug list entry.
There was a problem hiding this comment.
As a part of due diligence for the fix we must make sure that similar functionality in other places is not affected. In this case this means checking named parameter support in language constructs. I'd especially verify events, as these share a lot of code with errors, but are more:
- emitting events
- function calls
- internal
- external
- library
- bound
- virtual
- Especially when the names in the base function are in a different order.
- getter
- bare calls
- struct constructor invocations
For these named parameters are not allowed, but they should be still covered with (failing) tests using them:
- builtin calls
- ABI encoding builtins
- inherited constructor calls
- modifier invocations
- calls via function pointers
- type conversions (these are not calls, but look the same to the parser)
Is there anything else I'm missing?
There was a problem hiding this comment.
A couple of questions:
- When you say getters - do you mean auto generated ones, and how would named parameters fit here? My assumption is that getters don't take any parameters?
- What do you mean by bare calls?
call,staticcall,delegatecall? Can you give an example?
There was a problem hiding this comment.
My assumption is that getters don't take any parameters?
They do on array types. Though, now that I think of it, I'm not sure we support named arguments there. Please check in any case.
What do you mean by bare calls?
call,staticcall,delegatecall?
Yes. Not sure what the name of the data argument is (and if we actually support named arguments there) but it would be something like this:
a.call({data: ""});
test/libsolidity/semanticTests/errors/require_error_named_parameters.sol
Outdated
Show resolved
Hide resolved
test/libsolidity/semanticTests/errors/require_error_named_parameters.sol
Show resolved
Hide resolved
test/libsolidity/semanticTests/errors/require_error_named_parameters.sol
Show resolved
Hide resolved
a6503ed to
8bd6e00
Compare
8bd6e00 to
071ea8a
Compare
071ea8a to
4524716
Compare
Closes #16452