Skip to content

Conversation

RblSb
Copy link
Member

@RblSb RblSb commented May 12, 2025

Removes this temp vars for ES6 mode, functions that need function-scope this can be marked with

callback(@:js.function function() { // generate `function` in js instead of `() => {}`
// uses js.Lib.nativeThis, js.Syntax.code, etc
});

This is also port of pf_can_capture_this branch, so this capturing state is:
js-es5/python not supported
js-es6/php works
eval/lua/jvm/hl/cpp requires additional fixes, currently disabled

Closes #10352
See #9773

@kLabz
Copy link
Contributor

kLabz commented May 13, 2025

I'm really not sure we'd want to do that 🤔
Also seeing js-specific (new) code in typer doesn't feel right

@skial skial mentioned this pull request May 16, 2025
1 task
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.

[js] generate arrow functions for ES6 mode

2 participants