Samsung/escargot

An issue with the . Operator

marccarigiet opened this issue · 0 comments

Escargot :

  • OS: Ubuntu 20.04
  • Revision [4f8582e]

Describe the bug
Whether a SyntaxError is thrown with the . Operator has some inconsistency in combination with the minus sign.

Test case
Test code to reproduce the behavior:

v1 = 0;
- 1 . v1;

Backtrace

Script parsing error: SyntaxError: Line 1: Unexpected token .

Expected behavior
I would expect no error to be thrown, as that is what the other JavaScript engines do that i ran this example on, which includes V8 and SpiderMonkey.
Further, the following test cases also don't throw an Error on Escargot, but rather evaluate to NaN.

v1 = 0;
+ 1 . v1;
v1 = 0;
1 . v1;
v1 = 0;
v2 = 1
- v2 . v1;