solidity/test/libsolidity/semanticTests/inlineAssembly/constant_access.sol
hrkrshnn 88c99a7538 Tests/Docs: changing type of msg.sender and tx.origin into address
And also making the type of address(literal) as non-payable address.
2020-12-14 16:55:48 +01:00

22 lines
572 B
Solidity

contract C {
uint constant a = 2;
bytes2 constant b = 0xabcd;
bytes3 constant c = "abc";
bool constant d = true;
address constant e = 0x1212121212121212121212121212121212121212;
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
}
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 2, left(0xabcd), left(0x616263), true, 0x1212121212121212121212121212121212121212