Reporter | 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; }
enum TestEnum {} [Test] public bool Test() { var enum_name = Enum.GetName(typeof(TestEnum), 100); if (enum_name != null) return true; else return false; }