-
-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug when trying to upcast a delegate return type #185
Comments
Both examples worked with v2.8.1, but stopped working in v2.9.0, so it's linked to PR #140. |
…icitly object. Force the return type of a lambda expression to typeof(void) to prevent the emission of a conversion expresssion. Fixes dynamicexpresso#185
That was a side effect of the lambda expression support. Background: the parser is able to correctly detect the type of an expression, but it emits a conversion expression from the actual type to the requested return type (so here, When parsing a lambda expression, the return type is not known beforehand, so we use To fix all this, when parsing a lambda expression, I now use |
Thanks @metoule ! I would go dig it myself and submit a PR later, but you were faster than me. |
* No longer omit the conversion expression when the return type is explicitly object. Force the return type of a lambda expression to typeof(void) to prevent the emission of a conversion expression. Fixes #185 * Remove PrepareDelegateInvoke to avoid modifying the arguments list.
These simple examples used to run just fine on 2.8X and fails at 2.9.5.
I believe support to auto upcasting should be maintained.
The text was updated successfully, but these errors were encountered: