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

RSRP-289184: incorrect possible null ref

$
0
0
Reporter rune funch (rune.funch) rune funch (rune.funch)
Created Mar 7, 2012 12:41:03 AM
Updated Mar 7, 2012 12:41:03 AM
Priority Normal
Type Unspecified
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
THe below code results in a possible null ref at argumentTypes[i] which is incorrect since argumentTypes can only be null it arguments is null and there's an explicit check for that not being the case

var argumentTypes = arguments == null ? null : new TypeSpec[arguments.Count];
if (arguments != null){
for (var i = 0; i < arguments.Count;i++ ){
var argument = arguments[i];
if (argument.Type == null)
argument.Resolve(ec);
argumentTypes[i] = argument.Type;
}
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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