package test:variants; interface test { roundtrip-option: func(a: option) -> option; roundtrip-result: func(a: result) -> result; enum e1 { a, b } roundtrip-enum: func(a: e1) -> e1; invert-bool: func(a: bool) -> bool; variant c1 { a(s32), b(s64) } variant c2 { a(s32), b(f32) } variant c3 { a(s32), b(f64) } variant c4 { a(s64), b(f32) } variant c5 { a(s64), b(f64) } variant c6 { a(f32), b(f64) } type casts = tuple; variant-casts: func(a: casts) -> casts; variant z1 { a(s32), b } variant z2 { a(s64), b } variant z3 { a(f32), b } variant z4 { a(f64), b } type zeros = tuple; variant-zeros: func(a: zeros) -> zeros; type option-typedef = option; type bool-typedef = bool; type result-typedef = result; variant-typedefs: func(a: option-typedef, b: bool-typedef, c: result-typedef); enum my-errno { success, a, b } variant-enums: func(a: bool, b: result, c: my-errno) -> tuple; } world variants { import test; export test; export test-imports: func(); }