Update obsolote assert. (#3752)

Fixes #3713.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg 2020-05-18 13:13:43 +02:00 committed by GitHub
parent 0aad9cb431
commit 09ac2ffa67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -2639,7 +2639,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
lexer_lit_location_t lit_location;
parser_strict_mode_type_t strict_mode = PARSER_USE_STRICT_NOT_FOUND;
JERRY_ASSERT (context_p->stack_depth == 0);
JERRY_ASSERT (context_p->stack_depth <= 1);
#ifndef JERRY_NDEBUG
JERRY_ASSERT (context_p->context_stack_depth == context_p->stack_depth);
#endif /* !JERRY_NDEBUG */

View File

@ -0,0 +1,18 @@
// Copyright JS Foundation and other contributors, http://js.foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
function $(b = eval()) {
""
eval()
}