Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors: remove dead code in ERR_INVALID_ARG_TYPE #31322

Closed

Conversation

Flarna
Copy link
Member

@Flarna Flarna commented Jan 11, 2020

Remove unreachable code. As expected is converted to an Array the 'not ' check will be never executed.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the errors Issues and PRs related to JavaScript errors originated in Node.js core. label Jan 11, 2020
Remove unreachable code. As expected is converted to an Array the
'not ' check will be never executed.
@Flarna Flarna changed the title lib: remove dead code in ERR_INVALID_ARG_TYPE errors: remove dead code in ERR_INVALID_ARG_TYPE Jan 11, 2020
@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 11, 2020
@nodejs-github-bot
Copy link
Collaborator

} else {
msg += 'must be ';
}
msg += 'must be ';
Copy link
Contributor

Choose a reason for hiding this comment

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

Could simplify this further by including the literal inline inside the two conditionals above.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not that a big fan of duplication.

@Trott
Copy link
Member

Trott commented Jan 14, 2020

Landed in eb5e1dd

@Trott Trott closed this Jan 14, 2020
Trott pushed a commit that referenced this pull request Jan 14, 2020
Remove unreachable code. As expected is converted to an Array the
'not ' check will be never executed.

PR-URL: #31322
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@Flarna Flarna deleted the errors-remove-dead-code branch January 14, 2020 06:29
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
Remove unreachable code. As expected is converted to an Array the
'not ' check will be never executed.

PR-URL: #31322
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@codebytere codebytere mentioned this pull request Jan 16, 2020
codebytere pushed a commit that referenced this pull request Mar 14, 2020
Remove unreachable code. As expected is converted to an Array the
'not ' check will be never executed.

PR-URL: #31322
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
Remove unreachable code. As expected is converted to an Array the
'not ' check will be never executed.

PR-URL: #31322
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@codebytere codebytere mentioned this pull request Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants