WebAssembly / interface-types

Other
641 stars 57 forks source link

Does flags enum type as be used typename or member name? #142

Open lygstate opened 2 years ago

lygstate commented 2 years ago

Rationale:

https://github.com/WebAssembly/wasi-filesystem/pull/39#issuecomment-996393018 https://github.com/WebAssembly/wasi-filesystem/pull/40 https://github.com/WebAssembly/wasi-filesystem/pull/41

lukewagner commented 2 years ago

Sorry, I'm not sure I understand the question. In case it helps: the idea is that (flags "a" "b" "c") logically expands to a variant (variant (case "a") (case "b") (case "c")) and it can be used anywhere any other interface type can be used (in function parameters, results, list elements, record fields, or other variants' payloads, etc).