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

Multiple "var to explicit type" actions #4746

Closed
mhutch opened this Issue May 7, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@mhutch
Member

mhutch commented May 7, 2018

The fix menu shows multiple actions/fixes to convert var to explicit types.

screen shot 2018-05-07 at 2 42 07 pm

VS bug #612396

@Therzok

This comment has been minimized.

Member

Therzok commented May 7, 2018

The first one is a quick fix, the second one is a refactoring.

I'm not sure why refactor is not grouped.

@mhutch

This comment has been minimized.

Member

mhutch commented May 7, 2018

Nope, "To explicit type" is RefactoringEssentials

Roslyn is "Use explicit type".

The screenshot above is a fix, not a refactoring. Roslyn appears to disable the refactoring when the analyzer fix would make it redundant.

You can see here with the analyzer disabled, both the RE and Roslyn refactorings show up:

screen shot 2018-05-07 at 3 06 02 pm

@Therzok

This comment has been minimized.

Member

Therzok commented May 7, 2018

Okay then, we can remove the dupe in RE.

mkrueger added a commit that referenced this issue May 8, 2018

Fixes issue #4746 Multiple "var to explicit type" actions
Explict -> var was a dupe as well.

@mkrueger mkrueger self-assigned this May 8, 2018

@mkrueger mkrueger added this to the 15.8 milestone May 8, 2018

mkrueger added a commit that referenced this issue May 8, 2018

Merge pull request #4750 from mono/master-issue4746
Fixes issue #4746 Multiple "var to explicit type" actions
@xamarin-release-manager

This comment has been minimized.

Contributor

xamarin-release-manager commented May 8, 2018

Fixed in version 7.6.0.730 (master)

Pull Request #4750 merged by: Mike Krüger
Author: mono
Commit: d404b39 (mono/monodevelop)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment