Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24227,6 +24227,11 @@ namespace ts {
// To avoid that we will give an error to users if they use arguments objects in arrow function so that they
// can explicitly bound arguments objects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it should not execute the following two lines.

You should add

return errorType;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (symbol === argumentsSymbol) {
if (isInPropertyInitializer(node)) {
error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers);
return errorType;
}

const container = getContainingFunction(node)!;
if (languageVersion < ScriptTarget.ES2015) {
if (container.kind === SyntaxKind.ArrowFunction) {
Expand Down
Loading