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

RSRP-223950: "Expression is always false" optimization breaks the code (Type.ReflectedType can be null)

$
0
0
Reporter Eugene Komisarenko (ekomisarenko) Eugene Komisarenko (ekomisarenko)
Created Mar 5, 2011 12:49:12 AM
Updated Jan 24, 2012 5:21:32 PM
Resolved Jan 24, 2012 5:21:32 PM
Priority Normal
Type Bug
Fix versions No Fix versions
State Can't Reproduce
Assignee Evgeny Pasynkov (pasynkov)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
ReSharper suggests to do optimization for the following code saying that RefrectedType property can not be null.

var reflectedType = propertyType.ReflectedType;
return reflectedType == null ? DeserializeObject(objectSrc, propertyType) : DeserializeObject(objectSrc, reflectedType);


After optimization code becomes broken, because ReflectedType can actually be null.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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