"Implement Interface" defines multiple methods for nested interfaces #5813
Labels
Area-LangService-CodeFixes
Code fixes associated with diagnostics
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Uh oh!
There was an error while loading. Please reload this page.
This one is a bit weird, and I don't know if this is the right place for it.
If you define two interfaces that implement a common, third interface, the "quick action" (CTRL + .) will re-implement the common interface when it should not, even if the third interface is explicitly implemented. (If the third interface is not explicitly implemented, the quick-action does nothing.)
Repro steps
Consider the following code:
If you define a type,
Foo
as the following:The attempting to use the quick-action to implement
IBaz
completely will result in:This is obviously not the correct action for a nested interface.
Expected behavior
The interface function that has already been implemented for a higher-level interface should not be reimplemented.
Actual behavior
The member is reimplemented, and
FS0855: No abstract or interface member was found that corresponds to this override
is thrown. (Thus, the resulting code cannot compile without modification.)Known workarounds
Delete the extraneous member(s).
Related information
Provide any related information
The text was updated successfully, but these errors were encountered: