Skip to content

BridgeJS: Fix syntax error in generated JS#789

Open
wfltaylor wants to merge 1 commit into
swiftwasm:mainfrom
wfltaylor:double-ret
Open

BridgeJS: Fix syntax error in generated JS#789
wfltaylor wants to merge 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?

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