8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9df539 commit 07dbd30Copy full SHA for 07dbd30
src/compiler/checker.ts
@@ -8241,9 +8241,9 @@ module ts {
8241
var localContainer =
8242
localVarDeclList.parent.kind === SyntaxKind.VariableStatement &&
8243
localVarDeclList.parent.parent;
8244
-
8245
- // if block scoped variable is defined in the function\module\source file scope
8246
- // then since function scoped variable is hoised their names will collide
+
+ // names of block-scoped and function scoped variables can collide only
+ // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting)
8247
var namesShareScope =
8248
localContainer &&
8249
(localContainer.kind === SyntaxKind.Block && isAnyFunction(localContainer.parent) ||
0 commit comments