Skip to content

Conversation

@orktes
Copy link
Contributor

@orktes orktes commented Nov 20, 2025

Seems to fix it but TBH no idea if it causes a regression somewhere else.

@orktes orktes changed the title Fix https://github.com/dop251/goja/issues/688 Fix #688 Nov 20, 2025
@dop251
Copy link
Owner

dop251 commented Nov 21, 2025

I think the fix is correct, at least I could not think of any scenario where it wouldn't work... The point of the check is to prevent declarations in a single-statement context. The declaration parameter is only true if it's a statement context.

Thanks for submitting!

@dop251 dop251 merged commit 56b1242 into dop251:master Nov 21, 2025
4 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.

Class declaration inside in the single statement if fails

2 participants