mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
19 lines
710 B
Solidity
19 lines
710 B
Solidity
contract C {
|
|
function f() public returns (uint, uint) {
|
|
try this {
|
|
} catch {
|
|
}
|
|
try gasleft() {
|
|
} catch {
|
|
}
|
|
try type(address) {
|
|
} catch {
|
|
}
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 5347: (72-76): Try can only be used with external function calls and contract creation calls.
|
|
// TypeError 2536: (119-128): Try can only be used with external function calls and contract creation calls.
|
|
// TypeError 4259: (176-183): Invalid type for argument in the function call. A contract type or an integer type is required, but type(address) provided.
|
|
// TypeError 2536: (171-184): Try can only be used with external function calls and contract creation calls.
|