Skip to content

BridgeJS: Fix syntax error in generated JS#789

Merged
kateinoigakukun merged 1 commit into
swiftwasm:mainfrom
wfltaylor:double-ret
Jul 20, 2026
Merged

BridgeJS: Fix syntax error in generated JS#789
kateinoigakukun merged 1 commit into
swiftwasm:mainfrom
wfltaylor:double-ret

Conversation

@wfltaylor

Copy link
Copy Markdown
Contributor

When lifting a string return from an instance method on a struct, the following invalid JavaScript could be generated:

const ret = instance.exports.bjs_Vector2D_describe();
const ret = tmpRetString;

This PR addresses this using the existing scoped variable identifier disambiguator.

@kateinoigakukun kateinoigakukun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would you mind adding a runtime test as well?

@kateinoigakukun
kateinoigakukun merged commit 0e35c39 into swiftwasm:main Jul 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants