Incorrect warning with lambda function

Hi there,

I'm getting a context error from the R# 4.0 "pre-EAP" on a valid section of
code that involves lambda functions. The code in question is an
implementation of a Y-Combinator. The context error is:

"Argument type 'T' is not assignable to parameter type 'System.Func'" The code generating the error is: private class Wrap { public readonly Func, T> It; public Wrap(Func, T> it) { It = it; } } public static Func Y(Func, Func> f) { Func>, Func> g = wx => f(wx.It(wx)); return g(new Wrap>(wx => f(y =>]]> wx.It(wx)(y))));

The context error appears for the segment "wx.It(wx)".

Mike Strobel

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

You may want to check our request tracking policy here:

Best regards,
- Development Team.


Please sign in to leave a comment.