Skip to content

Commit f1dd59e

Browse files
zherczegdbatyai
authored andcommitted
Property modifiers should not be checked before an equals. (#3509)
Fixes #3434. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
1 parent 9a81601 commit f1dd59e

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

jerry-core/parser/js/js-lexer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,6 +2966,7 @@ lexer_check_property_modifier (parser_context_t *context_p) /**< context */
29662966
|| context_p->source_p[0] == LIT_CHAR_COMMA
29672967
|| context_p->source_p[0] == LIT_CHAR_RIGHT_BRACE
29682968
|| context_p->source_p[0] == LIT_CHAR_LEFT_PAREN
2969+
|| context_p->source_p[0] == LIT_CHAR_EQUALS
29692970
#endif /* ENABLED (JERRY_ES2015) */
29702971
|| context_p->source_p[0] == LIT_CHAR_COLON)
29712972
{
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright JS Foundation and other contributors, http://js.foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
function g({
16+
["y"]: {
17+
get = 5
18+
}
19+
}) {}

0 commit comments

Comments
 (0)