1contract C {
2    enum X {A, B}
3
4    function test_return() public returns (X) {
5        X garbled;
6        assembly {
7            garbled := 5
8        }
9        return garbled;
10    }
11
12    function test_inline_assignment() public returns (X _ret) {
13        assembly {
14            _ret := 5
15        }
16    }
17
18    function test_assignment() public returns (X _ret) {
19        X tmp;
20        assembly {
21            tmp := 5
22        }
23        _ret = tmp;
24    }
25}
26
27// ====
28// EVMVersion: >=byzantium
29// compileToEwasm: also
30// compileViaYul: also
31// ----
32// test_return() -> FAILURE, hex"4e487b71", 33 # both should throw #
33// test_inline_assignment() -> FAILURE, hex"4e487b71", 33
34// test_assignment() -> FAILURE, hex"4e487b71", 33
35