Reporter | Vladimir Reshetnikov (nikov) |
---|---|
Created | Dec 30, 2011 1:54:15 AM |
Updated | Jan 10, 2012 11:05:11 PM |
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.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(); } }