mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add semantic test for CHAINID in inline assembly
This commit is contained in:
parent
0033d63522
commit
fc2af72a3d
12
test/libsolidity/semanticTests/inlineAssembly/chainid.sol
Normal file
12
test/libsolidity/semanticTests/inlineAssembly/chainid.sol
Normal file
@ -0,0 +1,12 @@
|
||||
contract C {
|
||||
function f() public returns (uint id) {
|
||||
assembly {
|
||||
id := chainid()
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// EVMVersion: >=istanbul
|
||||
// ----
|
||||
// f() -> 1
|
Loading…
Reference in New Issue
Block a user