Skip to content
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

Implicit return in lambdas does not work inside a quasiquote #153

Open
masonwheeler opened this issue Aug 10, 2016 · 0 comments
Open

Implicit return in lambdas does not work inside a quasiquote #153

masonwheeler opened this issue Aug 10, 2016 · 0 comments

Comments

@masonwheeler
Copy link
Contributor

The LINQ call x = data.Where({d | d.Value > threshold}) works just fine as a standalone line of code; the Boo compiler will automagically transform the right-hand side of the lambda from an ExpressionStatement to a ReturnStatement. But if you put it in a quasiquote, for example inside a macro or metamethod:

method.Body.Add([| x = data.Where({d | d.Value > threshold}) |])

The code generated from this will result in a compile error because the implicit return never gets added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant