blob: 37272d3a782baa8766450f83a90a6406b6223fac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// for-of can iterate strict arguments objects in non-strict code.
load(libdir + "iteration.js");
Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
var s;
function g(obj) {
for (var v of obj)
s += v;
}
function f() {
"use strict";
g(arguments);
}
s = '';
f(1, 2, 3);
assertEq(s, '123');
|