solang-parser 0.2.1

Solang Solidity Parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pragma abicoder               v2;

contract C {
    enum E { A, B }
    function f(E e) public pure returns (uint x) {
        assembly { x := e }
    }
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f(uint8): 0 -> 0
// f(uint8): 1 -> 1
// f(uint8): 2 -> FAILURE
// f(uint8): 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -> FAILURE