Remove LITERAL_POOL_IN_EXPORT flag at class statement end (#4348)
Fixes #4265 JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
This commit is contained in:
@@ -2130,6 +2130,9 @@ scanner_scan_statement_end (parser_context_t *context_p, /**< context */
|
||||
|
||||
terminator_found = true;
|
||||
parser_stack_pop_uint8 (context_p);
|
||||
#if ENABLED (JERRY_MODULE_SYSTEM)
|
||||
scanner_context_p->active_literal_pool_p->status_flags &= (uint16_t) ~SCANNER_LITERAL_POOL_IN_EXPORT;
|
||||
#endif /* ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
lexer_next_token (context_p);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// 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.
|
||||
|
||||
try {
|
||||
eval ("export class Dog {constructor() {}}; for (var a")
|
||||
} catch (e) {
|
||||
assert (e instanceof SyntaxError)
|
||||
}
|
||||
Reference in New Issue
Block a user