mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-30 19:41:56 +00:00
Fix bindings for classes only referenced through struct fields
The bindings generation for a class would accidentally omit the `__wrap` function if it was only discovered very late in the process that `__wrap` was needed, after we'd already passed the point where we needed to have decided that. This commit moves struct field generation of bindings much earlier in the binding generation process which should ensure everything is all hooked up by the time we generate the classes themselves. Closes #949
This commit is contained in:
@@ -132,3 +132,7 @@ exports.js_js_rename = () => {
|
||||
(new wasm.JsRename()).bar();
|
||||
wasm.classes_foo();
|
||||
};
|
||||
|
||||
exports.js_access_fields = () => {
|
||||
assert.ok((new wasm.AccessFieldFoo()).bar instanceof wasm.AccessFieldBar);
|
||||
};
|
||||
|
Reference in New Issue
Block a user