mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
511 B
Solidity
22 lines
511 B
Solidity
|
contract C {
|
||
|
function f() public view returns (uint256 ret) {
|
||
|
assembly {
|
||
|
let prevrandao := sload(0)
|
||
|
ret := prevrandao
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function g() public pure returns (uint256 ret) {
|
||
|
assembly {
|
||
|
function prevrandao() -> r {
|
||
|
r := 1000
|
||
|
}
|
||
|
ret := prevrandao()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
// ====
|
||
|
// EVMVersion: >=paris
|
||
|
// ----
|
||
|
// ParserError 5568: (101-111): Cannot use builtin function name "prevrandao" as identifier name.
|