diff --git a/jerry-core/parser/js/js-lexer.c b/jerry-core/parser/js/js-lexer.c
index b38c19d3d..d734585cb 100644
--- a/jerry-core/parser/js/js-lexer.c
+++ b/jerry-core/parser/js/js-lexer.c
@@ -3186,21 +3186,6 @@ lexer_expect_object_literal_id (parser_context_t *context_p, /**< context */
lexer_consume_next_character (context_p);
return;
}
- case LIT_CHAR_DOT:
- {
- if ((ident_opts & ((uint32_t) ~(LEXER_OBJ_IDENT_OBJECT_PATTERN | LEXER_OBJ_IDENT_SET_FUNCTION_START)))
- || context_p->source_p + 2 >= context_p->source_end_p || context_p->source_p[1] != LIT_CHAR_DOT
- || context_p->source_p[2] != LIT_CHAR_DOT)
- {
- break;
- }
-
- context_p->token.type = LEXER_THREE_DOTS;
- context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;
- PARSER_PLUS_EQUAL_LC (context_p->column, 3);
- context_p->source_p += 3;
- return;
- }
#endif /* JERRY_ESNEXT */
case LIT_CHAR_RIGHT_BRACE:
{
@@ -3213,6 +3198,27 @@ lexer_expect_object_literal_id (parser_context_t *context_p, /**< context */
lexer_consume_next_character (context_p);
return;
}
+#if JERRY_ESNEXT
+ case LIT_CHAR_DOT:
+ {
+ if (!(context_p->source_p + 1 >= context_p->source_end_p || lit_char_is_decimal_digit (context_p->source_p[1])))
+ {
+ if ((ident_opts & ((uint32_t) ~(LEXER_OBJ_IDENT_OBJECT_PATTERN | LEXER_OBJ_IDENT_SET_FUNCTION_START)))
+ || context_p->source_p + 2 >= context_p->source_end_p || context_p->source_p[1] != LIT_CHAR_DOT
+ || context_p->source_p[2] != LIT_CHAR_DOT)
+ {
+ break;
+ }
+
+ context_p->token.type = LEXER_THREE_DOTS;
+ context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;
+ PARSER_PLUS_EQUAL_LC (context_p->column, 3);
+ context_p->source_p += 3;
+ return;
+ }
+ /* FALLTHRU */
+ }
+#endif /* JERRY_ESNEXT */
default:
{
const uint8_t *char_p = context_p->source_p;
diff --git a/tests/test262-esnext-excludelist.xml b/tests/test262-esnext-excludelist.xml
index 8cdf8def6..7e8e0daf7 100644
--- a/tests/test262-esnext-excludelist.xml
+++ b/tests/test262-esnext-excludelist.xml
@@ -100,8 +100,6 @@
-
-
@@ -307,8 +305,6 @@
-
-