[340] Bad Context Error
The given expression is never of the provided type is incorrectly shown in the code below.
Thanks
Sean
public static void Test]]>(IFoo item) where T : Bar
{
// 'The given expression is never of the provided type' shown under 'root is T' below.
if (!(item is T))
Console.WriteLine("Is not T");
else
Console.WriteLine("Is T");
}
public interface IFoo
{
int Id { get; }
}
public class Bar : IFoo
{
public int Id { get { return 0; } }
}
Please sign in to leave a comment.
Hello,
We appreciate your feedback.
The corresponding JIRA request has been created, and you are welcome to monitor
its status at http://www.jetbrains.net/jira/browse/RSRP-34796.
Best regards,
- Development Team.