File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,10 @@ static void
405405parser_check_duplicated_private_field (parser_context_t * context_p , /**< context */
406406 uint8_t opts ) /**< options */
407407{
408- JERRY_ASSERT (context_p -> token .type == LEXER_LITERAL );
408+ if (context_p -> token .type != LEXER_LITERAL )
409+ {
410+ parser_raise_error (context_p , PARSER_ERR_EXPRESSION_EXPECTED );
411+ }
409412 JERRY_ASSERT (context_p -> private_context_p );
410413 scanner_class_private_member_t * iter = context_p -> private_context_p -> members_p ;
411414
Original file line number Diff line number Diff line change 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+ class C { #get [ Symbol ] ; }
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ shiftNegativeLHS:jerry-math/*.c
3131shiftTooManyBits:jerry-core/*.c
3232shiftTooManyBitsSigned:jerry-math/*.c
3333signConversionCond:jerry-core/*.c
34- uninitvar:jerry-core/parser/js/js-parser-expr.c:3420
34+ uninitvar:jerry-core/parser/js/js-parser-expr.c:3423
3535uninitvar:tests/unit-core/test-api-objecttype.c:119
3636unmatchedSuppression:jerry-core/*.inc.h
3737unreadVariable:jerry-core/*.c
You can’t perform that action at this time.
0 commit comments