Errors for overrides in partial class derived from Application

I have a Application class declared like this:
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// Some more start up code
}
}

R#4 gives me the following warning:
Base type 'Application' is already specified in other parts.

If I accept the "Remove redundant super type specifier I end up with the following class:
public partial class App
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// Some more start up code
}
}

This compiles just fine, but R#4 shows an error for the override: "There is no suitable method for override". The suggested fixes for this are:
- Override OnStartup(StartupEventArgs) (in class System.Windows.Application) instead
- Remove 'override' modifier

The first one does not actually do anything, and the second one removes the override modifier as expected but this breaks the class.

I guess something is wrong with R#4's handling of overrides in partial classes that doesn't have the base type explicitly specified. Anyone else noticed this? Can I fix it through configuration?

1 comment
Comment actions Permalink

Hello,

We appreciate your feedback. The corresponding JIRA request has been created,
and you are welcome to monitor its status at http://www.jetbrains.net/jira/browse/RSRP-75267.

You may want to check our request tracking policy here: http://www.jetbrains.net/confluence/display/ReSharper/ReSharperIssueTracker

Best regards,
- Development Team.


0

Please sign in to leave a comment.