Home | History | Annotate | Download | only in harmony

Lines Matching refs:function

57 // the code. Thus the generated function is not called here.
58 function TestLocalThrows(str, expect) {
59 assertThrows("(function(){ 'use strict'; " + str + "})", expect);
62 function TestLocalDoesNotThrow(str) {
63 assertDoesNotThrow("(function(){ 'use strict'; " + str + "})()");
111 // Test function declarations in source element and
113 function f() {
115 function g0() {
118 function h() { }
120 function h1() { }
124 function g1() { }
129 // Test function declarations in statement position in strict mode.
130 TestLocalThrows("function f() { if (true) function g() {}", SyntaxError);
131 TestLocalThrows("function f() { if (true) {} else function g() {}", SyntaxError);
132 TestLocalThrows("function f() { do function g() {} while (false)", SyntaxError);
133 TestLocalThrows("function f() { while (false) function g() {}", SyntaxError);
134 TestLocalThrows("function f() { label: function g() {}", SyntaxError);
135 TestLocalThrows("function f() { for (;false;) function g() {}", SyntaxError);
136 TestLocalThrows("function f() { switch (true) { case true: function g() {} }", SyntaxError);
137 TestLocalThrows("function f() { switch (true) { default: function g() {} }", SyntaxError);