mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Change in eval var scope introduces ReferenceError
This commit is contained in:
parent
31f1bb5a75
commit
b383fc32ed
20
src/function-forms/eval-var-scope-syntax-err.case
Normal file
20
src/function-forms/eval-var-scope-syntax-err.case
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2016 Valerie Young. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: sloppy direct eval in params introduces var
|
||||
template: error
|
||||
info: |
|
||||
|
||||
Runtime Semantics: IteratorBindingInitialization
|
||||
FormalParameter : BindingElement
|
||||
|
||||
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
|
||||
|
||||
|
||||
features: [default-parameters]
|
||||
---*/
|
||||
|
||||
//- params
|
||||
a = eval("var a = 42")
|
||||
//- error
|
||||
SyntaxError
|
Loading…
x
Reference in New Issue
Block a user