Skip to content

Conversation

@forki
Copy link
Contributor

@forki forki commented May 31, 2016

fixes #1203

@forki
Copy link
Contributor Author

forki commented Jun 2, 2016

image

@forki forki changed the title WIP Better error message when abstract member impl is wrong Better error message when abstract member impl is wrong Jun 2, 2016
@forki
Copy link
Contributor Author

forki commented Jun 2, 2016

This one is ready for review.

Copy link
Contributor

Choose a reason for hiding this comment

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

This can be Lists.existsSquared

@KevinRansom
Copy link
Contributor

I think the error message does not really make clear why the additional parenthesis is needed perhaps this:

The member 'Function' expects a tupled argument.  The required signature is 'member IInterface.Function : (int32 * int32) -> unit.  A Member function uses parenthesis' and commas to indicate sequential arguments.  Use additional parenthesis' to indicate the argument is tupled.  E.g.
        member this.Function ( (i, j) )

@forki
Copy link
Contributor Author

forki commented Jun 22, 2016

@KevinRansom the issue is that we can't really decide if the implementation is wrong or someone already did a wrong interface definition

@forki forki force-pushed the tuple branch 2 times, most recently from d042924 to ebe9a8a Compare June 22, 2016 07:31
@KevinRansom
Copy link
Contributor

@forki the interface exists and is what is being implemented, so it can be assumed to be correct and thus the implementation must be at fault by not specifying a tuple. My real point is that the revised error message didn't really explain why the extra parenthesis' is needed.

@forki
Copy link
Contributor Author

forki commented Jun 24, 2016

In the reported case the interface contained the bug. But I understand what
you mean
On Jun 24, 2016 4:49 PM, "Kevin Ransom (msft)" [email protected]
wrote:

@forki https://github.com/forki the interface exists and is what is
being implemented, so it can be assumed to be correct and thus the
implementation must be at fault by not specifying a tuple. My real point is
that the revised error message didn't really explain why the extra
parenthesis' is needed.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1229 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AADgNJq-sWL2Ejr79hSBncI0Fx2sDteWks5qO-6EgaJpZM4IqX-q
.

@cartermp
Copy link
Contributor

the issue is that we can't really decide if the implementation is wrong or someone already did a wrong interface definition

We should bias towards the interface as-written to be intended here.

@dsyme
Copy link
Contributor

dsyme commented Jul 22, 2016

@forki Please fix merge conflicts when you get the chance, thanks

@forki
Copy link
Contributor Author

forki commented Jul 22, 2016

done. but these were non-trivial so we better wait for green.

@forki
Copy link
Contributor Author

forki commented Jul 22, 2016

ok good. seems to work

@dsyme dsyme merged commit c184a34 into dotnet:master Jul 22, 2016
@dsyme
Copy link
Contributor

dsyme commented Jul 22, 2016

All green apart from AppVeyor, which is taking a while to catch up

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.

Improve error reporting: Member implementation with tuple argument(s)

5 participants