mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
37 lines
441 B
Solidity
37 lines
441 B
Solidity
pragma experimental solidity;
|
|
|
|
/*
|
|
class a:StackType {
|
|
function stackSize() -> (integer);
|
|
}
|
|
|
|
instantiate uint256 : StackType {
|
|
function stackSize() -> (integer) {
|
|
return 1;
|
|
}
|
|
}
|
|
*/
|
|
|
|
function f(a) -> (b) {
|
|
return a;
|
|
}
|
|
|
|
contract C {
|
|
fallback() external {
|
|
let x : word;
|
|
let y : word;
|
|
assembly {
|
|
x := 0x42
|
|
}
|
|
y = f(x);
|
|
assembly {
|
|
mstore(0, y)
|
|
return(0, 32)
|
|
}
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: true
|
|
// ----
|
|
// () -> 21
|