- changed status to resolved
Lexer error erases last variable assignment
Issue #641
closed
- Enter
x=5
. The result is5
andx
is set to5
. - Enter
@
. The "invalid expression" error is shown. - Clear the editor line and enter
x
. The result is0
, should be5
.
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)
-
reporter -
reporter - changed status to closed
Fixed.
- Log in to comment
Do not assign variable in case of scan error. Properly rest the variable assignments properties before scanning. Fix issue
#641.→ <<cset 04d536c0d0c7>>