mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Also mention regular abi.encode in error message.
This commit is contained in:
@@ -1797,7 +1797,10 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
|
||||
functionType->kind() == FunctionType::Kind::SHA256 ||
|
||||
functionType->kind() == FunctionType::Kind::RIPEMD160
|
||||
)
|
||||
msg += " This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.";
|
||||
msg +=
|
||||
" This function requires a single bytes argument."
|
||||
" Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour"
|
||||
" or abi.encode(...) to use ABI encoding.";
|
||||
m_errorReporter.typeError(_functionCall.location(), msg);
|
||||
}
|
||||
else if (isPositionalCall)
|
||||
@@ -1853,7 +1856,10 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
|
||||
functionType->kind() == FunctionType::Kind::SHA256 ||
|
||||
functionType->kind() == FunctionType::Kind::RIPEMD160
|
||||
)
|
||||
msg += " This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.";
|
||||
msg +=
|
||||
" This function requires a single bytes argument."
|
||||
" Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour"
|
||||
" or abi.encode(...) to use ABI encoding.";
|
||||
m_errorReporter.typeError(arguments[i]->location(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user