solidity/test/libsolidity/syntaxTests/inlineAssembly/evm_istanbul_on_petersburg.sol

20 lines
828 B
Solidity
Raw Normal View History

contract C {
function f() pure external returns (uint id) {
assembly {
id := chainid()
}
}
function g() view external returns (uint sb) {
assembly {
sb := selfbalance()
}
}
}
// ====
// EVMVersion: =petersburg
// ----
// TypeError 1561: (101-108): The "chainid" instruction is only available for Istanbul-compatible VMs (you are currently compiling for "petersburg").
// DeclarationError 8678: (95-110): Variable count for assignment to "id" does not match number of values (1 vs. 0)
2020-07-07 09:17:58 +00:00
// TypeError 7721: (215-226): The "selfbalance" instruction is only available for Istanbul-compatible VMs (you are currently compiling for "petersburg").
// DeclarationError 8678: (209-228): Variable count for assignment to "sb" does not match number of values (1 vs. 0)