Closed dmzimmerman closed 1 year ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I'm not sure why it thinks I haven't signed the CLA; I signed it for the other PR (and just went through it again now).
The current OCaml-Solidity parser does not properly handle the use of higher-order functions. For example, given this code:
it returns the following error:
Type error: Invalid type for argument in "function call". Invalid implicit conversion from "function(int256) nonpayable " to "function(int256) nonpayable " requested
. This is because it doesn't realize that apublic
function is an acceptable substitute for theinternal
function expected as a parameter tohof
.This PR fixes this issue (and other similar type conversion issues) with higher-order functions by implementing the allowed conversions for function types and mutabilities; it also includes several test cases to exercise the functionality.