solidity/test/libsolidity/ASTJSON/assembly/switch.sol

13 lines
208 B
Solidity
Raw Normal View History

2019-10-15 10:38:12 +00:00
contract C {
function f() pure public {
assembly {
let f := 0
switch calldatasize()
case 0 { f := 1 }
default { f := 2 }
}
}
}
// ----