You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makes sense. This probably has to do with how we convert TS to JS. We append each line of REPL input into a "virtual" file, then compile the entire thing. Then we diff the emitted JS from our previous compilation with the current compilation to see which lines are new. We run the new lines.
Probably the first line compiles from 100 + 10 into 100 + 10; and we run that.
This may not be as simple as adding semicolons after every line of input, because there are cases where the user intentionally wants to split input across multiple lines. For example invokeFunction( [enter] and then arguments go on the next line.
I've marked this as "help wanted" to indicate that we will accept a pull request which fixes it.
Although this is a bug, I think it is low severity. I suspect that most users, given the choice between fixing this bug and merely avoiding it when they use the REPL, would opt to avoid it. But if any users feel differently and invest the time in a bugfix, we will certainly accept it.
Expected Behavior
It should produce a syntax error.
Actual Behavior
It seems to combine what you typed with the expression you entered previously.
Steps to reproduce the problem
Minimal reproduction
See above.
Specifications
The text was updated successfully, but these errors were encountered: