Skip to content

Suggest a function to implement if no abstract method matches#1230

Merged
dsyme merged 2 commits into
dotnet:masterfrom
forki:no-matching
Jul 21, 2016
Merged

Suggest a function to implement if no abstract method matches#1230
dsyme merged 2 commits into
dotnet:masterfrom
forki:no-matching

Conversation

@forki

@forki forki commented May 31, 2016

Copy link
Copy Markdown
Contributor

while working on #1229 I found this would be useful:

image

@isaacabraham

Copy link
Copy Markdown
Contributor

Link to #1232

@forki

forki commented Jun 2, 2016

Copy link
Copy Markdown
Contributor Author

One of the existing tests showed an interesting case. Here we don't have an implementation slot since the method is already implemented. I tried to improve the message for this case as well:

image

@forki forki force-pushed the no-matching branch 2 times, most recently from b3c721d to 0b6153b Compare June 2, 2016 13:07
@forki forki changed the title WIP Suggest a function to implement if no abstract method matches Suggest a function to implement if no abstract method matches Jun 2, 2016
@forki

forki commented Jun 2, 2016

Copy link
Copy Markdown
Contributor Author

I think this one is ready for review

@KevinRansom

KevinRansom commented Jun 21, 2016

Copy link
Copy Markdown
Contributor

How about a small change to the Message:

The type Foo contains the member 'MyX' but it is not a virtual or abstract method that is available to override or implement.
Available methods to override or implement:
   Equals
   ...

@forki

forki commented Jun 22, 2016

Copy link
Copy Markdown
Contributor Author

@KevinRansom I'd like to keep the "Maybe you want" part consistent. This allows emacs users to grep and use this as poor man's IntelliSense.
That said: we should probably improve the concrete wording in that part.

@KevinRansom

Copy link
Copy Markdown
Contributor

@forki "Maybe you want" is usually a question rather than a statement and so there should be a question mark there somewhere. That is why I think "Available methods to override or implement:" is preferable.

@forki

forki commented Jun 24, 2016

Copy link
Copy Markdown
Contributor Author

Yep I agree. Current formulation is suboptimal. But I'd like to have the
same sentence for all of these suggestions. So I hope we can find one that
is better than the current and still works everywhere. (as said above this
might allow some tools to actually make sense out of this)
On Jun 24, 2016 4:53 PM, "Kevin Ransom (msft)" notifications@github.com
wrote:

@forki https://github.com/forki "Maybe you want" is usually a question
rather than a statement and so there should be a question mark there
somewhere. That is why I think "Available methods to override or
implement:" is preferable.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1230 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AADgNJVVXAWGIbDCkz113cXF7uJ7Ntmlks5qO-91gaJpZM4IqjoM
.

@TeaDrivenDev

Copy link
Copy Markdown

"You may want"?

@dsyme dsyme merged commit 296e7f2 into dotnet:master Jul 21, 2016
@dsyme

dsyme commented Jul 21, 2016

Copy link
Copy Markdown
Contributor

Thanks again @forki and @isaacabraham

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.

6 participants