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;
}
}