Reporter | Vladimir Reshetnikov (nikov) |
---|---|
Created | Apr 14, 2012 7:48:06 AM |
Updated | Apr 14, 2012 7:48:06 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 |
class C { void Bar(params object[] y) // Rename Bar to Foo { this.Foo(1, this.Foo(2, this.Foo(3, 4, 5), 6).Foo(7, 8), 9); } } static class E { public static object Foo<T>(this T x, params object[] y) { return null; } }
Actual result:
class C { void Foo(params object[] y) { E.Foo(this, 1, E.Foo(this.Foo(2, this.Foo(3, 4, 5), 6), 7, 8), 9); // error CS1503: Argument 2: cannot convert from 'void' to 'object' } } static class E { public static object Foo<T>(this T x, params object[] y) { return null; } }
Expected:
class C { void Foo(params object[] y) { E.Foo(this, 1, E.Foo(this, 2, E.Foo(this, 3, 4, 5), 6).Foo(7, 8), 9); // OK } } static class E { public static object Foo<T>(this T x, params object[] y) { return null; } }