;; test.wast
(module
(global $g anyref (ref.null none))
(func $test (result anyref)
(block $block
(if (result anyref)
(unreachable)
(then
(global.get $g)
)
(else
(br $block)
)
)
)
(unreachable)
)
)
wasm-opt -all test.wast --remove-unused-brs
[wasm-validator error in function test] unexpected false: arms of unreachable if-else must have compatible types, on
(if
(unreachable)
(then
(global.get $g)
)
(else
(block $block
(br $block)
)
)
)
Fatal: error after opts