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

Quick fix all for abstract class creates duplicates in the dropdown and code #43181

Closed
AlCalzone opened this issue Feb 8, 2018 · 2 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Milestone

Comments

@AlCalzone
Copy link

Issue Type

Bug

Description

When extending an abstract class with multiple methods/properties, the quick fix dropdown has multiple instances of the same solution. In addition, selecting "quick fix all" creates duplicates of the function implementations.

Steps to reproduce:

  1. Create a TypeScript file with contents
export abstract class Foo {
	abstract a(): void;
	abstract b(): void;
	abstract c(): void;
}

class Bar extends Foo {
	
}
  1. place the cursor on Bar, open the quick fix dropdown
    foo1

  2. select "quick fix all"
    foo2

VS Code Info

VS Code version: Code 1.20.0 (c63189d, 2018-02-07T17:10:31.920Z)
OS version: Windows_NT ia32 6.1.7601

System Info
Item Value
CPUs Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz (4 x 3312)
Memory (System) 7.93GB (3.49GB free)
Process Argv C:\Program Files (x86)\Microsoft VS Code\Code.exe
Screen Reader no
VM 0%
Extensions (3)
Extension Author (truncated) Version
java red 0.18.1
vscode-java-debug vsc 0.6.0
vscode-java-pack vsc 0.2.0
Reproduces without extensions
@vscodebot vscodebot bot added the new release label Feb 8, 2018
@octref octref added typescript Typescript support issues and removed new release labels Feb 8, 2018
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Feb 8, 2018
@mjbvz mjbvz added this to the February 2018 milestone Feb 8, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Feb 8, 2018

Thanks. Fixed the duplicate quick fixes showing in the light bulb menu with d2d18a4

The duplicate method generation looks like an upstream issue. I've opened microsoft/TypeScript#21776 to track this

@mjbvz mjbvz closed this as completed Feb 8, 2018
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Feb 8, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Feb 8, 2018

Note to February verifier: please only check that duplicate entries do not show up in the lightbulb menu. The bug with applying the quick fix itself is an upstream issue and I'm not sure when TS will get around to fixing it

@octref octref added the verified Verification succeeded label Mar 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants