-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Check for unused getter/setter in classes #21013
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ghost
requested a review
from sheetalkamat
January 4, 2018 22:39
mhegazy
reviewed
Jan 4, 2018
switch (member.kind) { | ||
case SyntaxKind.MethodDeclaration: | ||
case SyntaxKind.PropertyDeclaration: | ||
case SyntaxKind.GetAccessor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will report the error twice then.. consider reporting it only on the first of a pair of accessors.
mhegazy
approved these changes
Jan 4, 2018
…ter if getter exists
ghost
deleted the
unusedGetterInClass
branch
January 5, 2018 17:11
errendir
added a commit
to errendir/TypeScript
that referenced
this pull request
Jan 7, 2018
* origin/master: (61 commits) Add release-2.7 to covered branches LEGO: check in for master to temporary branch. LEGO: check in for master to temporary branch. API: fix types to undefined union (microsoft#20909) Fix conflict between formatting rules (microsoft#21038) Switch to block-bodied lambda Better name for deferred mapped type:ReverseMapped Slightly simplify getCodeActions Make fixCannotFindModule return an empty array if there is no code action In checkAndAggregateReturnExpressionTypes, treat MethodDeclaration in an object literal same as a FunctionExpression (microsoft#20052) Return string completions for indexed access types Check for unused getter/setter in classes (microsoft#21013) Only replace `implements` with a comma if the heritage clauses are sensible Refine extends-to-implements code fix Fix version of @types/node to 8.5.5 (microsoft#21019) fix microsoft#20449, insert space between decorators (microsoft#20491) findConfigFile can return undefined (microsoft#20556) Allowed trailing commas in type parameter/argument lists (microsoft#20599) Added localization instructions to CONTRIBUTING.md (microsoft#20451) Simplify marker names ...
sandersn
added a commit
that referenced
this pull request
Jan 22, 2018
Turns out SemicolonClassElement is a specific kind for semicolons inside a class. Having one of them with --noUnusedLocals on would crash the compiler after the assert added in #21013.
sandersn
added a commit
that referenced
this pull request
Jan 22, 2018
Turns out SemicolonClassElement is a specific kind for semicolons inside a class. Having one of them with --noUnusedLocals on would crash the compiler after the assert added in #21013.
mhegazy
pushed a commit
that referenced
this pull request
Jan 30, 2018
Turns out SemicolonClassElement is a specific kind for semicolons inside a class. Having one of them with --noUnusedLocals on would crash the compiler after the assert added in #21013.
mhegazy
added a commit
that referenced
this pull request
Jan 31, 2018
Turns out SemicolonClassElement is a specific kind for semicolons inside a class. Having one of them with --noUnusedLocals on would crash the compiler after the assert added in #21013.
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These were excluded from the check for no clear reason -- probably just an oversight.