Skip to content

Commit fd0ff34

Browse files
Comments.
1 parent 3ef397e commit fd0ff34

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ module ts {
382382
if (getSymbol(ctor.locals, name, meaning & SymbolFlags.Value)) {
383383
// Remember the property node, it will be used later to report appropriate error
384384
propertyWithInvalidInitializer = location;
385-
}
385+
}
386386
}
387387
}
388388
break;
@@ -504,6 +504,9 @@ module ts {
504504
}
505505

506506
if (argumentsUsedInArrowFunction) {
507+
// At this point we've resolved the owner of 'arguments' and know it needs to be captured.
508+
// Flag the owner to indicate that it will need to capture at emit-time.
509+
// If we were resolved in the global scope, use 'lastLocation' as 'location' will be undefined.
507510
getNodeLinks(location || lastLocation).flags |= NodeCheckFlags.CaptureArguments;
508511
}
509512

0 commit comments

Comments
 (0)