Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/wiggle/tests/keywords_union.witx
1692 views
(typename $union
  (enum (@witx tag u8)
    $self
    $power
  )
)

(typename $self
  (variant (@witx tag $union)
    ;; A union variant that will expand to a strict keyword `Self`.
    (case $self (@witx pointer f32))
    ;; Oh it's true, that there's power in a union!
    (case $power (@witx pointer f32))
  )
)