blob: 3fd94f4cccebaa8b06b0334206cda42e2b256f95 [file] [log] [blame]
ggaren@apple.com961dc372015-09-04 02:39:20 +00001function test() {
2
3// Note: only available outside of strict mode.
4if (!this) return false;
5var passed = f() === 1;
6function f() { return 1; }
7
8passed &= typeof g === 'undefined';
9{ function g() { return 1; } }
10passed &= g() === 1;
11
12passed &= h() === 2;
13{ function h() { return 1; } }
14function h() { return 2; }
15passed &= h() === 1;
16
17return passed;
18
19}
20
21if (!test())
22 throw new Error("Test failed");
23