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

assert: remove unreachable code #27786

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 20, 2019

In lib/internal/assert/assertion_error.js, line 391 assures that
operator is 'deepEqual' so there is no need to check the value of
operator in a ternary on the next line (line 392). Remove the ternary.

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

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label May 20, 2019
@Trott Trott requested a review from BridgeAR May 20, 2019 23:38
@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 20, 2019
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

lib/internal/assert/assertion_error.js Outdated Show resolved Hide resolved
In lib/internal/assert/assertion_error.js, line 391 assures that
`operator` is 'deepEqual' so there is no need to check the value of
`operator` in a ternary on the next line (line 392). Remove the ternary.
@Trott Trott force-pushed the assertion-error-unreachable branch from 48cf267 to 082b9e0 Compare May 23, 2019 14:47
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member Author

Trott commented May 23, 2019

Landed in 99268b1

@Trott Trott closed this May 23, 2019
Trott added a commit to Trott/io.js that referenced this pull request May 23, 2019
In lib/internal/assert/assertion_error.js, line 391 assures that
`operator` is 'deepEqual' so there is no need to check the value of
`operator` in a ternary on the next line (line 392). Remove the ternary.

PR-URL: nodejs#27786
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 28, 2019
In lib/internal/assert/assertion_error.js, line 391 assures that
`operator` is 'deepEqual' so there is no need to check the value of
`operator` in a ternary on the next line (line 392). Remove the ternary.

PR-URL: #27786
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request Jun 3, 2019
@Trott Trott deleted the assertion-error-unreachable branch January 13, 2022 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants