Skip to content
Discussion options

You must be logged in to vote

I think the rule is that any expression that is allowed as an statement is allowed as the body of a void-returning lambda.

new C(); // ok
1; // error

That's why you get the same error here.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@333fred
Comment options

Answer selected by 333fred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants