[340] Bad Context Error

The given expression is never of the provided type is incorrectly shown in the code below.



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");
Console.WriteLine("Is T");

public interface IFoo
int Id { get; }

public class Bar : IFoo
public int Id { get { return 0; } }

1 comment
Comment actions Permalink


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.


Please sign in to leave a comment.