Skip to content

Conversation

@forki
Copy link
Contributor

@forki forki commented Dec 28, 2016

image

image

@forki forki changed the title Suggest Record labels Suggest Record labels and Union cases Dec 28, 2016
@vasily-kirichenko
Copy link
Contributor

vasily-kirichenko commented Dec 28, 2016

I this "Replace with" suffix is not needed. What about AnotherCase?..?

@forki
Copy link
Contributor Author

forki commented Dec 28, 2016

How is C# doing this? The text is from earlier commit. But we can change it.

@forki
Copy link
Contributor Author

forki commented Dec 28, 2016

ready for review

@cartermp
Copy link
Contributor

Hmmm. Not sure I like surfacing the possibility of something completely unrelated, like GetHashCode when we're specifically trying to fix a Record label or DU case. That's likely going to result in quite a few people logging bugs with the feedback tool.

@forki
Copy link
Contributor Author

forki commented Dec 28, 2016

The GetHashCode can probably be filtered out here since it's not a static method. But this is unrelated to this PR here since without this PR it would only propose the GetHashCode (which is actually worse)

@cartermp
Copy link
Contributor

cartermp commented Dec 28, 2016

Okay. I think if we can filter out non-static members on types then all the suggestions will seem relevant.

@forki
Copy link
Contributor Author

forki commented Dec 28, 2016

just took a quick look. this is not easy to determine at this location since we don't know if we are invoked in static or member position. So since this PR only improves the current situation it should still be merged. I have an idea for the filtering and will apply that later.

@cartermp
Copy link
Contributor

Sounds good.

@forki
Copy link
Contributor Author

forki commented Dec 28, 2016

Ok all tests fixed

@forki
Copy link
Contributor Author

forki commented Dec 28, 2016

@cartermp since I saw your list on twitter. This pr is not for the analyzer. It's actually just the error message improvement.
But since the code fix stuff is already merged this error message is automatically used in the analyzer. Ionide will profit as well automatically when this got merged to FCS.

@cartermp
Copy link
Contributor

Good to know!

Copy link
Contributor

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@KevinRansom KevinRansom merged commit 06640a5 into dotnet:master Dec 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants