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

Key: RSRP-29034
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Andrey Simanovsky
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 1
Operations

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

'Use equality operator' shall be disabled if return value ignored

Created: 26 Sep 06 18:00   Updated: 24 Oct 06 18:12
Component/s: None
Fix Version/s: 2.0.2
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 262
Fixed in build: 264


 Description  « Hide
class Program
{
    static void Main()
    {
        Equals(null, null);
    }
}

Try context action 'Use equality operator'.

class Program
{
    static void Main()
    {
        null == null; // error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
    }
}

Context action 'Use equality operator' shall be disabled for such cases.
Possibly, it makes sense to show warning if return value of methods, inherited from System.Object (Equals, ToString etc), is ignored.



 All   Comments   Work Log   Change History      Sort Order: