-
Notifications
You must be signed in to change notification settings - Fork 794
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
Better error message when abstract member impl is wrong #1229
Conversation
c125a53
to
6a54b7f
Compare
3f73fdf
to
ed025ed
Compare
2a55ec6
to
fbede5c
Compare
This one is ready for review. |
|
||
let getSignature absSlot = (NicePrint.stringOfMethInfo cenv.amap mBinding env.DisplayEnv absSlot).Replace("abstract ","") | ||
let getDetails (absSlot:MethInfo) = | ||
if absSlot.GetParamTypes(cenv.amap,mBinding,[]) |> List.exists (fun xs -> xs |> List.exists (isTupleTy cenv.g)) then |
There was a problem hiding this comment.
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
I think the error message does not really make clear why the additional parenthesis is needed perhaps this:
|
@KevinRansom the issue is that we can't really decide if the implementation is wrong or someone already did a wrong interface definition |
d042924
to
ebe9a8a
Compare
@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. |
In the reported case the interface contained the bug. But I understand what
|
We should bias towards the interface as-written to be intended here. |
@forki Please fix merge conflicts when you get the chance, thanks |
done. but these were non-trivial so we better wait for green. |
ok good. seems to work |
All green apart from AppVeyor, which is taking a while to catch up |
fixes #1203