Missing warning "Type cast is redundant"

Hello

I am using ReSharper 4.0. I have the following code in one of our unit
tests:

01 PrefixSuffixController controller = GetController();
02 controller.Create(null as SubscriptionPrefixSuffixRedirection);

In line 02 no "Type cast is redundant" is shown where null will be casted to
SubscriptionPrefixSuffixRedirection. This only happens because the method
signature of the Create() method is as follows:

public PrefixSuffixMapping Create(PrefixSuffixMapping prefixSuffixMapping)

SubscriptionPrefixSuffixRedirection is a specialisation of the
PrefixSuffixMapping class. Shouldn't this show a "type cast is redundant"
warning?

Gabriel Lozano-Moran


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-58551.

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.