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

RSRP-256926: Incorrect "Expression always true" analysis on Enum.GetName()

$
0
0
Reporter Josh Buedel (jbuedel) Josh Buedel (jbuedel)
Created Apr 15, 2011 8:07:53 PM
Updated Apr 21, 2012 12:26:23 PM
Priority Show-stopper
Type Bug
Fix versions 6.0
State Reopened
Assignee Alexey Kuptsov (alexey.kuptsov)
Subsystem No subsystem
Affected versions 5.1.3, 6.1
Fixed in build 6.0.2156.707
Enum.GetName() is documented that it can return null, and I've verified that it does. This sample code shows R# is incorrectly flagging a call to said method.

enum TestEnum {} [Test] public bool Test() { var enum_name = Enum.GetName(typeof(TestEnum), 100); if (enum_name != null) return true; else return false; }

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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