mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
13 lines
501 B
Solidity
13 lines
501 B
Solidity
contract C {
|
|
function f(address a) external view returns (bool success) {
|
|
(success,) = a.call{gas: 42}("");
|
|
}
|
|
function h() external payable {}
|
|
function i() external view {
|
|
this.h{gas: 42}();
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 8961: (90-109='a.call{gas: 42}("")'): Function cannot be declared as view because this expression (potentially) modifies the state.
|
|
// TypeError 8961: (180-197='this.h{gas: 42}()'): Function cannot be declared as view because this expression (potentially) modifies the state.
|