Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium Harmony
New issue 4056 by [email protected]: Bug in strict-mode scoping in arrow
functions that call eval
https://code.google.com/p/v8/issues/detail?id=4056
With the test appended to this report, V8 resolves "s" to the global
object, somehow. Instead in the given call, "s" should resolve to the
string "this".
// 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: --harmony-arrow-functions
var object = {};
var call = Function.call.bind(Function.call);
function strictFunctionArrowEval(s) {
"use strict";
return (()=>eval(s))();
};
var expected = object;
var actual = call(strictFunctionArrowEval, object, "this");
if (expected != actual)
throw new Error("unexpected: "+actual);
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.