Description
I encountered internal error: entered unreachable code
with wasm-bindgen when I tried the git master version at merge of #1353 (and still there at the merge of #1372, not sure how far ago when the bug appear. But the bug is not in 0.2.39 release)
You can see the minimal code that produce the error here. In words, I have a library wb-lib
that wraps around Foo
in foo.js
. Foo
is a JS class that need a callback that the Rust code will pass a &js_sys::Function
to it. An app wb-app
depends on wb-lib
, it initialize a Foo
object.
Compile the provided repo (using a matched version of wasm-bindgen-cli) will cause the compile time error as shown in the backtrace
file (also in repo). Note that I run wasm-bindgen --web
.
No error if arguments not include a js_sys::Function
. No error with v0.2.39.