Closed haltman-at closed 4 years ago
Right before the release, I thought "did we actually test this"? We did, and it worked, but I only tested the test
function via remix, not the tester
:)
I think the bug is that FunctionType::asExternallyCallableFunction
does not properly change the location of the return variables, only the parameters.
Description
As of Solidity 0.6.9, it is possible for functions to return calldata pointers. If such a function is called externally, an InternalCompilerError results.
Suggested fix: Since I don't think there's really any sensible way to handle calling such a function externally, only
internal
andprivate
functions should be allowed to return calldata pointers.Environment
Steps to Reproduce
Attempting to compile this yields an ICE.