Commit cacc6108 authored by caitpotter88's avatar caitpotter88 Committed by Commit bot

[tests] add tests for "yield" as function name

BUG=v8:3983
LOG=N
R=wingo@igalia.com, littledan@chromium.org

Review URL: https://codereview.chromium.org/1437803004

Cr-Commit-Position: refs/heads/master@{#32682}
parent 6246c3ec
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function* gen() {
function yield() {}
}
*%(basename)s:6: SyntaxError: Unexpected identifier
function yield() {}
^^^^^
SyntaxError: Unexpected identifier
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function* gen() {
"use strict";
function yield() {}
}
*%(basename)s:7: SyntaxError: Unexpected strict mode reserved word
function yield() {}
^^^^^
SyntaxError: Unexpected strict mode reserved word
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function yield() { "use strict"; }
*%(basename)s:5: SyntaxError: Unexpected strict mode reserved word
function yield() { "use strict"; }
^^^^^
SyntaxError: Unexpected strict mode reserved word
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function* yield() {})
*%(basename)s:5: SyntaxError: Unexpected identifier
(function* yield() {})
^^^^^
SyntaxError: Unexpected identifier
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function yield() { "use strict"; })
*%(basename)s:5: SyntaxError: Unexpected strict mode reserved word
(function yield() { "use strict"; })
^^^^^
SyntaxError: Unexpected strict mode reserved word
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment