Skip to content

repl: Don’t complete non-simple expressions

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

repl

Description of change

Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it.

Previously, in terms like a().b., b. would be a partial match. This meant that completion would evaluate b and either fail with a ReferenceError or, if b was some global, return the properties of the global b object.

Merge request reports

Loading