[parser] Skipping inner funcs: add forgotten test.

Should've been part of https://chromium-review.googlesource.com/544300

BUG=v8:5516

Change-Id: I315b37d313b64c738174a6cd7461e5c46e362734
Reviewed-on: https://chromium-review.googlesource.com/544939
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46156}
This commit is contained in:
Marja Hölttä 2017-06-22 16:17:36 +02:00 committed by Commit Bot
parent a37f95ff54
commit 116363258d

View File

@ -122,3 +122,17 @@ function TestSkippedFunctionInsideLoopInitializer() {
assertEquals(0, saved_func());
}
TestSkippedFunctionInsideLoopInitializer();
(function TestSkippedFunctionWithParameters() {
var result = 0;
function lazy(ctxt_alloc_param) {
var ctxt_alloc_var = 10;
function skip_me(param1, param2) {
result = ctxt_alloc_param + ctxt_alloc_var + param1 + param2;
}
return skip_me;
}
lazy(9)(8, 7);
assertEquals(34, result);
})();