mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
520 B
TypeScript
18 lines
520 B
TypeScript
//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts] ////
|
|
|
|
//// [blockScopedFunctionDeclarationStrictES5.ts]
|
|
"use strict";
|
|
if (true) {
|
|
function foo() { } // Error to declare function in block scope
|
|
foo(); // This call should be ok
|
|
}
|
|
foo(); // Error to find name foo
|
|
|
|
//// [blockScopedFunctionDeclarationStrictES5.js]
|
|
"use strict";
|
|
if (true) {
|
|
function foo() { } // Error to declare function in block scope
|
|
foo(); // This call should be ok
|
|
}
|
|
foo(); // Error to find name foo
|