Open amkCha opened 5 years ago
Thanks for your report! This seems to be a limitation of the parser and this might not be so easy to fix.
This might be solvable with templates (#869), where abi.decode(data, (uint,address,function (uint,uint) external));
could turn into abi.decode.<uint, address, function (uint,uint) external>(data)
.
This cannot be solved without changing the AST: A function type name is not an elementary type name, but only elementary type name, identifiers and literals can be primary expressions. We would have to add a new AST node type, but I'm actually not sure this should be a primary expression. If it is not a primary expression, things get even more complicated.
Description
Function types are now available in solidity : I would like to abi.encode a function and then be able to abi.decode this function. The encoding works but the decoding bugs
Environment
Steps to Reproduce
In solidity, encoding function type works
The decoding part here bugs
Run : truffle compile => Error message CompileError: ParsedContract.sol:88:158: ParserError: Expected primary expression.
I also tried this
Run : truffle compile => Error message CompileError: ParsedContract.sol:88:158: ParserError: Expected primary expression.
Could someone help me with this issue ?
Thank you very much in advance ! ^^