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

RSRP-288339: False error: Cannot apply operator '==' to operands of type 'T' and 'string'

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Feb 16, 2012 3:43:11 AM
Updated Feb 16, 2012 3:43:11 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
using System;

class A
{
    static bool Foo<T>(T x, string s) where T : class, IDisposable
    {
        return x == s;
    }

    static void Main()
    {
        Console.WriteLine(Foo<IDisposable>(null, null));
        Console.WriteLine(Foo<IDisposable>(null, ""));
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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