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

RSRP-273215: Wrong "Type argument specification is redundant" with named parameters

$
0
0
Reporter Svyatoslav Danyliv (sdanyliv) 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;

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
{
}
}
}
ReSharper proposes to remove redundant types specification by Quick Fix and code becomes not compilable.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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