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
Improve error reporting: override method does not match abstract member #1430
Closed
Tracked by
#1103
Comments
WIP PR at #1950 |
forki
added a commit
to forki/visualfsharp
that referenced
this issue
Dec 7, 2016
forki
added a commit
to forki/visualfsharp
that referenced
this issue
Dec 7, 2016
forki
added a commit
to forki/visualfsharp
that referenced
this issue
Dec 8, 2016
@forki can this be closed? |
Yep
Am 20.01.2017 16:35 schrieb "Isaac Abraham" <notifications@github.com>:
… @forki <https://github.com/forki> can this be closed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1430 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNMjrNF_IGBAZhtpsFrdLVw_6m-xWks5rUNRCgaJpZM4Jjpoh>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What
When overriding an abstract member like this:
FSI yields the error message
error FS0856: This override takes a different number of arguments to the corresponding abstract member
for the definitions in
Derived1
andDerived2
anderror FS0001: This expression was expected to have type int but here has type string
for the definition in
Derived3
.Why
The error message does not suggest the correct signature of the abstract methods so you don't know if you have them in the right order, etc. This can be quite a pain when inheriting from a class with a lot of members (such as a WPF Window) and trying to find the right overload.
How
In all 3 cases above, the error message should include the full type signature(s) for
Member
(including any overloads).Bonus round
It would also be great to provide suggestions for members which can be overridden if the programmer has a typo in the method name, such as:
This currently produces the error:
error FS0855: No abstract or interface member was found that corresponds to this override
The text was updated successfully, but these errors were encountered: