Reporter | Svyatoslav Danyliv (sdanyliv) |
---|---|
Created | Jun 24, 2011 7:16:04 PM |
Updated | Apr 13, 2018 5:54:55 PM |
Resolved | Apr 13, 2018 5:54:55 PM |
Subsystem | Quick Fixes |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Normal |
State | Obsolete |
Type | Bug |
Fix version | Backlog |
Affected versions | 6.0 EAP |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
There is sample code that reproduces problem
using System;ReSharper proposes to remove redundant types specification by Quick Fix and code becomes not compilable.
namespace ConsoleApplication1
{
internal class Program
{
private static void Main(string[] args)
{
var data = new GridData<SomeRow>();
data.AddColumn("name", getter: v => v.Name); // Incorrect for Compiler
data.AddColumn<SomeRow, string>("name", getter: v => v.Name); // Correct
}
}
public class SomeRow
{
public string Name { get; set; }
}
public interface IGridData<TRow>
{
}
internal class GridData<TRow> : IGridData<TRow>
{
}
public static class Builder
{
public static void AddColumn<TRow, TColumnValue>(this IGridData<TRow> source, string name, string title = null,
Func<TRow, TColumnValue> getter = null) where TRow : class
{
}
}
}