History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-45506
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Pasynkov
Reporter: Igor Abade
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ReSharper

False alert: "Possible System.NullReferenceException"

Created: 13 Jul 07 22:37   Updated: 16 Jul 07 14:37
Component/s: Code Analysis - Control Flow
Fix Version/s: Mirabilie Futurum
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. scrshot.PNG
(9 kb)

Build: 500


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.