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

RSRP-204775: Wrong quick fix

$
0
0
Reporter Vasily (bornkiller) Vasily (bornkiller)
Created Jan 14, 2011 7:51:43 PM
Updated Jan 10, 2012 8:34:52 PM
Resolved Jan 10, 2012 8:34:52 PM
Priority Normal
Type Bug
Fix versions 6.1
State Fixed
Assignee eugene legkiy (jenya.legkiy)
Subsystem No subsystem
Affected versions 5.1.1
Fixed in build No Fixed in build
public List<TProc> GetProc<TProc>()
where TProc : ADataProcessor
{
var l = new List<TProc>();
//for is underlined
for (int i = 0; i < Items.Count; i++)
{
var p = Items[i] as TProc;
if (p != null) l.Add(p);
}
return l;
}

After q-fix:

public List<TProc> GetProc<TProc>()
where TProc : ADataProcessor
{
var l = new List<TProc>();
l.AddRange(Items.OfType());//error should be OfType<TProc>()
return l;
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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