Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement lambda params with modifiers without type name #69273
Implement lambda params with modifiers without type name #69273
Changes from 9 commits
709f34b
f93d99a
b892b36
00e96eb
9e34cf7
f606d54
5de151d
ec86619
b19c11e
8f37c4c
310b7b8
d0595bf
a3b48a6
9fc1a1e
245bce7
26a73d8
468da2b
bc3f5ff
1cb3f27
0b386d8
34a34a2
a201d80
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can
paramSyntax
benull
? If the lambda has non-zeroParameterCount
I would expect it to have corrsponding parameter syntaxes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be null in some tests for parameters with modifiers without parameter parentheses (e.g.
ref x => x
), which is illegal per the spec. Without the underlying changes, now permitting thenull
parameter syntax, the assertion would fail.Since the modifiers are not allowed in single-parameter unparenthesized lambda expressions, we need to at least expect the case to arise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't really get it either. i would not expect any sort of lambda to have a nulll parameter syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this sentence doesn't make sense. Just because the modifiers are not legal doesn't mean you get a null parameter syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made changes to preserve this, but kept the removal of the check about having an explicitly typed parameter list. To circumvent breaks, lambda binding data for simple lambda expressions (parameters without parentheses) now contain a singleton separated syntax list of parameter syntaxes.