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

RSRP-297180: Warn me if class with [Obsolete] parameterless ctor is passed as a type argument for a type parameter with new() constraint

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 24, 2012 12:30:54 AM
Updated Apr 24, 2012 6:19:03 PM
Priority Normal
Type Feature
Fix versions No Fix versions
State Submitted
Assignee Evgeny Pasynkov (pasynkov)
Subsystem Code Analysis
Affected versions No Affected versions
Fixed in build No Fixed in build
using System.Diagnostics;

class Program
{
    static void Main()
    {
        Foo<Debugger>(); // Warn me here
    }

    static void Foo<T>() where T : new()
    {
        var x = new T();
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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