Replacing parameter with base type

I have two overloads of a method which handle different types of controls by
initializing them from different nodes of an Xml file.

R# 4.0 build 804 is suggesting that I can replace both control type
parameters with Control which then gives me duplicate signatures. The
message is that 'parameter can be of type System.Windows.Forms.Control' but
it is clear that they cannot both be replaced.

Refactorings should definitely not create red where there was none before!

Oh, and thanks for the new build...

Richard Haber


1 comment
Comment actions Permalink

First of all, these suggestions are not refactorings, but nothing more than
suggestions.
They indicates that the methods doesn't use any specific for the parameter
to be too concrete type

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Richard Haber" <richard.haber@gmail.com> wrote in message
news:g0tfci$ipi$1@is.intellij.net...
>I have two overloads of a method which handle different types of controls
>by initializing them from different nodes of an Xml file.
>

R

  1. 4.0 build 804 is suggesting that I can replace both control type

parameters with Control which then gives me duplicate signatures. The
message is that 'parameter can be of type System.Windows.Forms.Control'
but it is clear that they cannot both be replaced.

>

Refactorings should definitely not create red where there was none
before!

>

Oh, and thanks for the new build...

>

Richard Haber



0

Please sign in to leave a comment.