Skip to content

Commit c74bb84

Browse files
committed
Moved getContainingFunction call in checkIdentifier
1 parent 82eae19 commit c74bb84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5755,8 +5755,8 @@ namespace ts {
57555755
// will be bound to non-arrow function that contain this arrow function. This results in inconsistent behavior.
57565756
// To avoid that we will give an error to users if they use arguments objects in arrow function so that they
57575757
// can explicitly bound arguments objects
5758-
let container = getContainingFunction(node);
57595758
if (symbol === argumentsSymbol) {
5759+
let container = getContainingFunction(node);
57605760
if (container.kind === SyntaxKind.ArrowFunction) {
57615761
if (languageVersion < ScriptTarget.ES6) {
57625762
error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);

0 commit comments

Comments
 (0)