From fac9ab2508d299d8a873692c4f71f5ccf2adba5a Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 20 Apr 2015 23:56:38 -0700 Subject: [PATCH] Clean up comment more. --- src/compiler/binder.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 6a3b410df30..ed318e1804e 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -349,18 +349,21 @@ module ts { case SyntaxKind.Block: // 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: + // that reside in this block should go to the function locals. Othewise 'x' + // would not appear to be a redeclaration of a block scoped local in the following + // example: // // 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 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. + // 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 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; }