2014-07-13 01:04:16 +02:00
|
|
|
//// [namedFunctionExpressionCallErrors.ts]
|
|
|
|
var recurser = function foo() {
|
|
|
|
};
|
|
|
|
|
|
|
|
// Error: foo should not be visible here
|
|
|
|
foo();
|
|
|
|
|
|
|
|
// recurser should be
|
|
|
|
recurser();
|
|
|
|
|
|
|
|
(function bar() {
|
|
|
|
// Error: foo should not be visible here either
|
|
|
|
foo();
|
|
|
|
});
|
|
|
|
|
|
|
|
// Error: bar should not be visible
|
|
|
|
bar();
|
|
|
|
|
|
|
|
//// [namedFunctionExpressionCallErrors.js]
|
|
|
|
var recurser = function foo() {
|
|
|
|
};
|
2014-08-16 00:49:09 +02:00
|
|
|
// Error: foo should not be visible here
|
2014-07-13 01:04:16 +02:00
|
|
|
foo();
|
2014-08-16 00:49:09 +02:00
|
|
|
// recurser should be
|
2014-07-13 01:04:16 +02:00
|
|
|
recurser();
|
|
|
|
(function bar() {
|
2014-08-16 00:49:09 +02:00
|
|
|
// Error: foo should not be visible here either
|
2014-07-13 01:04:16 +02:00
|
|
|
foo();
|
|
|
|
});
|
2014-08-16 00:49:09 +02:00
|
|
|
// Error: bar should not be visible
|
2014-07-13 01:04:16 +02:00
|
|
|
bar();
|