solidity/test/libsolidity/semanticTests/abiEncoderV1/enums.sol
Alex Beregszaszi 299873182b Cleanup ABICoder V1 tests
Include the pragma explicitly, rename the file to have a _v1 suffix, and also add V2 counterparts where missing.
2021-05-17 12:37:10 +01:00

15 lines
330 B
Solidity

pragma abicoder v1;
contract C {
enum E { A, B }
function f(E e) public pure returns (uint x) {
assembly { x := e }
}
}
// ====
// ABIEncoderV1Only: true
// ----
// f(uint8): 0 -> 0
// f(uint8): 1 -> 1
// f(uint8): 2 -> 2
// f(uint8): 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -> 0xff