2019-07-01 13:34:34 +00:00
|
|
|
contract C {
|
|
|
|
uint constant a = 2;
|
|
|
|
bytes2 constant b = 0xabcd;
|
|
|
|
bytes3 constant c = "abc";
|
|
|
|
bool constant d = true;
|
2020-12-03 22:05:05 +00:00
|
|
|
address constant e = 0x1212121212121212121212121212121212121212;
|
2019-07-01 13:34:34 +00:00
|
|
|
function f() public pure returns (uint w, bytes2 x, bytes3 y, bool z, address t) {
|
|
|
|
assembly {
|
|
|
|
w := a
|
|
|
|
x := b
|
|
|
|
y := c
|
|
|
|
z := d
|
|
|
|
t := e
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-11 17:59:00 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2019-07-01 13:34:34 +00:00
|
|
|
// ----
|
|
|
|
// f() -> 2, left(0xabcd), left(0x616263), true, 0x1212121212121212121212121212121212121212
|