Lexer error erases last variable assignment

Issue #641 closed
Tey' created an issue
  • Enter x=5. The result is 5 and x is set to 5.
  • Enter @. The "invalid expression" error is shown.
  • Clear the editor line and enter x. The result is 0, should be 5.

The problem is that Evaluator::eval() does not check if the call to Evaluator::evalNoAssign() failed, and since the latter does not reset m_assignId before scanning the expression (which fails), the value of the previously assigned variable is changed.

Fix on its way...

Comments (2)

  1. Log in to comment