mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
16 lines
527 B
Solidity
16 lines
527 B
Solidity
contract C {
|
|
function f() external view {}
|
|
function test(address a) external view returns (bool status) {
|
|
// This used to incorrectly raise an error about violating the view mutability.
|
|
(status,) = a.staticcall.gas(42)("");
|
|
(status,) = a.staticcall{gas: 42}("");
|
|
this.f.gas(42)();
|
|
this.f{gas: 42}();
|
|
}
|
|
}
|
|
// ====
|
|
// EVMVersion: >=byzantium
|
|
// ----
|
|
// Warning: (207-223): Using ".gas(...)" is deprecated. Use "{gas: ...}" instead.
|
|
// Warning: (276-286): Using ".gas(...)" is deprecated. Use "{gas: ...}" instead.
|