solidity/test/libsolidity/syntaxTests/inlineAssembly/evm_byzantium_on_homestead.sol
Matheus Aguiar 35661479b6 Revert "Disallow RETURNDATASIZE and RETURNDATACOPY in inline assembly blocks in pure functions"
This reverts commit f567eb1fb2.

Correcting Bugfixes section of Changelog.
2022-05-13 08:35:21 -03:00

22 lines
1.0 KiB
Solidity

contract C {
function f() pure external {
assembly {
let s := returndatasize()
returndatacopy(0, 0, s)
}
}
function g() view external returns (uint ret) {
assembly {
ret := staticcall(0, gas(), 0, 0, 0, 0)
}
}
}
// ====
// EVMVersion: =homestead
// ----
// TypeError 4778: (86-100): The "returndatasize" instruction is only available for Byzantium-compatible VMs (you are currently compiling for "homestead").
// DeclarationError 3812: (77-102): Variable count mismatch for declaration of "s": 1 variables and 0 values.
// TypeError 7756: (115-129): The "returndatacopy" instruction is only available for Byzantium-compatible VMs (you are currently compiling for "homestead").
// TypeError 1503: (245-255): The "staticcall" instruction is only available for Byzantium-compatible VMs (you are currently compiling for "homestead").
// DeclarationError 8678: (238-277): Variable count for assignment to "ret" does not match number of values (1 vs. 0)