[strong] Remove a regression test for "use before var".
This case should break in strong mode (unlike previously thought). R=rossberg@chromium.org BUG= Review URL: https://codereview.chromium.org/935093002 Cr-Commit-Position: refs/heads/master@{#26726}
This commit is contained in:
parent
69ecbc75b8
commit
90501dd703
@ -1,20 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Flags: --strong-mode
|
||||
|
||||
function strongFunction() {
|
||||
"use strong";
|
||||
// This should not be a "use before declaration" error, even though the
|
||||
// variable is defined later (by non-strong code). Rationale: Non-strong code
|
||||
// is allowed to use var declarations, and the semantics of var declarations
|
||||
// say that the variable should be usable before the declaration.
|
||||
return notStrong + 123;
|
||||
}
|
||||
|
||||
var notStrong = 456;
|
||||
|
||||
(function TestStrongFunctionUsingLaterDefinedNonStrongVar() {
|
||||
assertEquals(strongFunction(), 579);
|
||||
})();
|
Loading…
Reference in New Issue
Block a user