mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
25 lines
508 B
TypeScript
25 lines
508 B
TypeScript
//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts] ////
|
|
|
|
//// [blockScopedFunctionDeclarationInStrictClass.ts]
|
|
class c {
|
|
method() {
|
|
if (true) {
|
|
function foo() { }
|
|
foo(); // ok
|
|
}
|
|
foo(); // not ok
|
|
}
|
|
}
|
|
|
|
//// [blockScopedFunctionDeclarationInStrictClass.js]
|
|
"use strict";
|
|
class c {
|
|
method() {
|
|
if (true) {
|
|
function foo() { }
|
|
foo(); // ok
|
|
}
|
|
foo(); // not ok
|
|
}
|
|
}
|