solidity/test/libsolidity/semanticTests/inlineAssembly/basefee_berlin_function.sol
hrkrshnn 892700d769 Tests for basefee as identifier in inline assembly
Also added basefee to `EVMVersion::hasOpcode(...)`
2021-08-11 10:46:40 +02:00

23 lines
445 B
Solidity

contract C {
function f() public view returns (uint ret) {
assembly {
let basefee := sload(0)
ret := basefee
}
}
function g() public pure returns (uint ret) {
assembly {
function basefee() -> r {
r := 1000
}
ret := basefee()
}
}
}
// ====
// compileViaYul: also
// EVMVersion: <=berlin
// ----
// f() -> 0
// g() -> 1000