Project
ReSharper
Priority
Normal
Type
Bug
Fix versions
Mirabile Futurum
State
Open
Assignee
Evgeny Pasynkov
Subsystem
Code Analysis - Control Flow
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Igor Abade
    4 years ago (13 Jul 2007 23:37)
  • Updated by   Igor Abade
    4 years ago (16 Jul 2007 15:37)
  • Jira: RSRP-45506
    (history, comments)
 
RSRP-45506 False alert: "Possible System.NullReferenceException"
1
Issue is visible to: All Users
  The issue is visible to the selected user group only
When a variable is initialized inside of a conditional statement, then Resharper correctly highlights its usages as "Possible System.NullReferenceException".

However, if that variable is used inside of another conditional statement with exactly the same condition then it should not highlight that instance. After all, if the boolean expression evaluated as 'true' in the first condition then it should still evaluate as 'true' in the second pass if the operands' values are predictable (i.e. are literals or local variables).

Please see the attached screenshot for an example.
Comments (0)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Issue has no comments