Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

captureExpression shouldn't be used when compiling arrow functions #1451

Open
sdegueldre opened this issue Jun 8, 2023 · 0 comments
Open
Labels
owl-3 features for owl 3
Milestone

Comments

@sdegueldre
Copy link
Contributor

sdegueldre commented Jun 8, 2023

Playground link

We would expect this code to log 2, but it logs 1: all values from the context that are used by the function are frozen at function definition time.

Originally, this was meant to deal with loop variables, for which we want a new binding at every loop iteration, but it is overzealous and freezes all free variables.

consider the case of slots

@sdegueldre sdegueldre added the owl-3 features for owl 3 label Jun 8, 2023
@sdegueldre sdegueldre added this to the Version 3.0 milestone Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
owl-3 features for owl 3
Projects
None yet
Development

No branches or pull requests

1 participant