Open kaleidawave opened 3 months ago
Had some thoughts: Instead it will be probably be solved the same way as find_possible_mutations
. When a function is leaked outside the function it was defined it, it should run a similar Rust function to find_possible_mutations
which checks any free_variables
are defined. Thus avoiding any Event
stuff
Current TDZ finding is solved for standard statements AND for functions (as well as all things function-like). (thanks to #69 these errors have positions!)
This works for conditional function calls
However as it turns out with closures, TDZ issues are non-deterministic on their reference
Half the time this leaks a reference that never gets declared. Somehow we want to catch this mistake.
Things to think about
Math.random() > 0.99
). It needs to errorthrow
events).