Files
tsgo/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationStrictES6.symbols
2025-02-26 14:53:49 -08:00

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