Reporter | Vladimir Reshetnikov (nikov) |
---|---|
Created | Dec 30, 2011 1:54:15 AM |
Updated | Oct 15, 2018 4:31:03 PM |
Resolved | Oct 15, 2018 4:31:03 PM |
Subsystem | Quick Fixes - Create From Usage |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Normal |
State | Fixed |
Type | Bug |
Fix version | Unidentified prior version |
Affected versions | No Affected versions |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
using System.Collections.Generic;
class Program
{
static void Foo<T>(List<T> x)
{
Bar(x); // Create Bar from usage
}
}
Actual result:
using System.Collections.Generic;
class Program
{
static void Foo<T>(List<T> x)
{
Bar(x); // error CS1503: Argument 1: cannot convert from 'System.Collections.Generic.List<T>' to 'System.Collections.Generic.List<object>'
}
private static void Bar(List<object> objects)
{
throw new System.NotImplementedException();
}
}
Expected:
using System.Collections.Generic;
class Program
{
static void Foo<T>(List<T> x)
{
Bar(x); // OK
}
private static void Bar<T>(List<T> x)
{
throw new System.NotImplementedException();
}
}