FeatureRequest: Warning when casting generic type to a type that isn't listed in generic type constraints.

public class Foo
public void Bar<T>(T left, T right) where T:IComparable<T> { ((IComparable) left).CompareTo(right); }

I would appreciate if RS could issue a warning stating that IComparable isn't in the constraint list for T parameter.


*Edit: I created a feature request for this in the issue tracker: http://youtrack.jetbrains.net/issue/RSRP-182461 (don't know why I didn't do that in the first place).

Please sign in to leave a comment.