History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-36154
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Lomov
Reporter: Jimmy Mårdell
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

Generic method with where-constraint in interface through abstract base class causes erronous red squiggle in the final concrete class.

Created: 22 Feb 07 12:20   Updated: 20 Jun 07 10:58
Component/s: PSI - Resolve, Language - C#
Fix Version/s: 4.0
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 337


 Description  « Hide
The code below causes a red squiggle even though it compiles fine. The lack of the where-condition in
the concrete class seems to confuse Resharper, and the where-condition from the interface does not
seem to be passed through.

using System;
using System.Collections;
using System.Collections.Generic;

public interface IItem
{
int Id { get; }
}

public interface IMyInterface
{
void DoThis<TItem>(TItem item) where TItem : IItem;
}

public abstract class MyInterfaceBase : IMyInterface
{
public abstract void DoThis<TItem>(TItem item) where TItem : IItem;
}

public class OneImplementation : MyInterfaceBase
{
public override void DoThis<TItem>(TItem item)

{ int x = item.Id; }

}



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.