Skip to content

Instantly share code, notes, and snippets.

@nrnrnr
Created August 2, 2022 19:10
Show Gist options
  • Save nrnrnr/c20d2b117b259ce60c10e466c59d576a to your computer and use it in GitHub Desktop.
Save nrnrnr/c20d2b117b259ce60c10e466c59d576a to your computer and use it in GitHub Desktop.
type error corrected (but feels a bit bogus)
(module
(type (;0;) (func (result i32)))
(import "env" "__linear_memory" (memory (;0;) 0))
(func $foo (type 0) (result i32)
nop
i32.const 42
if (result i32) ;; label = @1
nop
i32.const 42
return
else
nop
i32.const 42
if (result i32) ;; label = @2
nop
i32.const 42
return
else
nop
i32.const 42
if ;; label = @3
nop
else
nop
i32.const 42
if ;; label = @4
nop
else
nop
end
nop
end
nop
i32.const 42
return
end
end))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment