23 lines
525 B
Plaintext
23 lines
525 B
Plaintext
|
==== tests/cases/compiler/namedFunctionExpressionCallErrors.ts (3 errors) ====
|
||
|
var recurser = function foo() {
|
||
|
};
|
||
|
|
||
|
// Error: foo should not be visible here
|
||
|
foo();
|
||
|
~~~
|
||
|
!!! Cannot find name 'foo'.
|
||
|
|
||
|
// recurser should be
|
||
|
recurser();
|
||
|
|
||
|
(function bar() {
|
||
|
// Error: foo should not be visible here either
|
||
|
foo();
|
||
|
~~~
|
||
|
!!! Cannot find name 'foo'.
|
||
|
});
|
||
|
|
||
|
// Error: bar should not be visible
|
||
|
bar();
|
||
|
~~~
|
||
|
!!! Cannot find name 'bar'.
|