mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-26 11:11:34 +00:00
Fix codegen of consuming setters/getters (#2172)
Make sure they reset their internal pointer to null after we call Rust since it invalidates the Rust pointer after being called! Closes #2168
This commit is contained in:
@ -33,4 +33,11 @@ exports.js_works = () => {
|
||||
useMoved();
|
||||
moveMoved();
|
||||
methodMoved();
|
||||
|
||||
const a = new wasm.Fruit('a');
|
||||
a.prop;
|
||||
assertMovedPtrThrows(() => a.prop);
|
||||
const b = new wasm.Fruit('a');
|
||||
b.prop = 3;
|
||||
assertMovedPtrThrows(() => { b.prop = 4; });
|
||||
};
|
||||
|
Reference in New Issue
Block a user