Skip to content

repl: Don’t complete expressions when eval() failed

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

Instead of changing the way “simple” expressions are detected, switch to ignoring errors when completing. This approach is more generic than the previous one from 0b66b8f2, but also changes the way errors are thrown when completing.

Fixes: #6325 (closed)

This includes a revert of the regular expression change in #6192. This is also a completely inappropriate solution if it is intended that trying to complete expressions like a = b.c.d with b not defined throw a ReferenceError; the test file seems to be laid out to expect that behaviour. I can’t imagine how that might be even remotely desirable, though.

Merge request reports

Loading