Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-277549: 'Check param for null' CA adds annotation attribute, which is then flagged for manual removal

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Oct 26, 2011 5:17:11 PM
Updated Apr 26, 2012 9:49:26 PM
Priority Show-stopper
Type Bug
Fix versions 7.0
State Open
Assignee Alexey Kuptsov (alexey.kuptsov)
Subsystem Context Actions
Affected versions 6.0
Fixed in build No Fixed in build
public class Foo : IFoo
{
    public void Request(string arg)
    {
        // 1. add 'check for null' on 'arg' above
        // 2. R# adds null check and [NonNull] to parameter above
        // 3. R# then says the attribute it just added is redundant and should be removed
    } 
}

public interface IFoo
{
    void Request([NotNull] string arg);
}


R# shouldn't add the [NotNull] or [CanBeNull] attributes when they're specified in a parent.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>