Skip to content

Unused type parameters should be checked by --noUnusedParameters, not --noUnusedLocals. - #21167

Merged
Mohamed Hegazy (mhegazy) merged 1 commit into
microsoft:masterfrom
mattmccutchen:unused-type-parameter
Jan 26, 2018
Merged

Mohamed Hegazy (mhegazy) merged 1 commit into
microsoft:masterfrom
mattmccutchen:unused-type-parameter

Conversation

@mattmccutchen

Copy link
Copy Markdown
Contributor

Fixes #20568.

Most of the existing test cases of unused type parameters passed both --noUnusedParameters and --noUnusedLocals. A few test cases passed only --noUnusedLocals and failed after I changed the code; I changed them to pass only --noUnusedParameters. I also added the two missing contexts of type parameters (method, lambda) to tests/cases/compiler/unusedTypeParametersWithUnderscore.ts and used this test case as the basis of new test cases testing specifically that unused type parameters are checked with --noUnusedParameters alone and not with --noUnusedLocals alone.

@mhegazy

Copy link
Copy Markdown
Contributor

I am in the process of forking for TS 2.7, i will merge this once i am done.

@mhegazy
Mohamed Hegazy (mhegazy) merged commit f0ba16c into microsoft:master Jan 26, 2018
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jul 3, 2018
@mattmccutchen
Matt McCutchen (mattmccutchen) deleted the unused-type-parameter branch July 7, 2018 21:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants