From b81a2c00ba4c3d5604c1305f1f129ca37a7eec7c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 20 Apr 2015 23:52:46 -0700 Subject: [PATCH] Clean up comment. --- src/compiler/binder.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index b4a993a805e..ad5ca83585e 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -348,19 +348,19 @@ module ts { return ContainerFlags.IsBlockScopedContainer; case SyntaxKind.Block: - // do not treat function block a block-scope container. All block-scope locals + // do not treat blocks directly inside a function as a block-scoped-container. // that reside in this block should go to the function locals. Otherwise this // wouldn't be considered as redeclaration of a block scoped local: // - // function foo() { - // var x; - // let x; - // } + // function foo() { + // var x; + // let x; + // } // // If we placed 'var x' into the function locals and 'let x' - into the locals of - // the block, then there would be no collision. By doing this, we ensure that both - // 'var x' and 'let x' go into the Function-container's locals, and we do get a - // collision conflict. + // the block, then there would be no collision. By not creating a new block- + // scoped-container here, we ensure that both 'var x' and 'let x' go into the + // Function - container's locals, and we do get a collision conflict. return isFunctionLike(node.parent) ? ContainerFlags.None : ContainerFlags.IsBlockScopedContainer; }