package foo:foo; interface option-result { // NB: this record used to be empty, but that's no longer valid, so now it's // non-empty. Don't want to delete the whole test however. record empty { not-empty-anymore: bool, } record o-one { a: option, } record o-nested { a: option>, } type o1 = option; type o2 = option; type o4 = option>; type r1 = result; type r2 = result<_, empty>; type r3 = result; type r4 = result; type r5 = result, o1>; type r6 = result>, o2>; type r7 = result>, o4>; type o5 = option; type o6 = option>>; o5-arg: func(x: o5); o5-result: func() -> o5; o6-arg: func(x: o6); o6-result: func() -> o6; r1-arg: func(x: r1); r1-result: func() -> r1; r2-arg: func(x: r2); r2-result: func() -> r2; r3-arg: func(x: r3); r3-result: func() -> r3; r4-arg: func(x: r4); r4-result: func() -> r4; r5-arg: func(x: r5); r5-result: func() -> r5; r6-arg: func(x: r6); r6-result: func() -> r6; r7-arg: func(x: r7); r7-result: func() -> r7; multi: func(x: r7, y: r7) -> (a: r7, b:r7, c: r7); multi-option: func(x: r7, y: r7) -> option>; } world my-world { import option-result; export option-result; }