使用版本0.6.0
pragma solidity ^0.6.0;
contract Test {
function sendValue(address payable recipient, uint256 amount) external {
(bool success, ) = recipient.call{ value: amount }("");
}
}
Run Code Online (Sandbox Code Playgroud)
Test.sol:5:42:ParserError:预期为“;” 但得到 '{' (bool success, ) =recipient.call{ value: amount }(""); ^
为什么会出现这个错误?
solidity ×1