mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
477 B
Plaintext
13 lines
477 B
Plaintext
//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts] ////
|
|
|
|
=== blockScopedFunctionDeclarationStrictES6.ts ===
|
|
"use strict";
|
|
if (true) {
|
|
function foo() { } // Allowed to declare block scope function
|
|
>foo : Symbol(foo, Decl(blockScopedFunctionDeclarationStrictES6.ts, 1, 11))
|
|
|
|
foo(); // This call should be ok
|
|
>foo : Symbol(foo, Decl(blockScopedFunctionDeclarationStrictES6.ts, 1, 11))
|
|
}
|
|
foo(); // Cannot find name since foo is block scoped
|