-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Test plan for "Default Lambda Parameters" #62485
Comments
A few failure cases that are coming to mind as I'm doing parsing changes that need to be added at a future step:
Warning Cases:
|
This was referenced Oct 25, 2022
This was referenced Oct 26, 2022
This was referenced Nov 3, 2022
This was referenced Nov 16, 2022
This was referenced Nov 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Championed issue: dotnet/csharplang#6051
Spec: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-12.0/lambda-method-group-defaults.md
General
Syntax
=
arglist
with initializer(int i = > 0) => { }
Semantics
unsafe
scenariossizeof
int*
parameter withnull
default valuevar
produces anonymous delegate type with default parameters and does not use Action/Func(dynamic d = null) => { }
create a delegate withdynamic
parameter type? (Same question for(dynamic d, ref int i) => { }
.)(T t = default) => { }
,(T t = null) => { }
share a delegate type whenT
is appropriately constrained?new[] { (int i = 1) => { }, (int i = 2) => { } }
is there a best common type or an error?Emit
Invoke
method for the lambda has default parametersProductivity
var
The text was updated successfully, but these errors were encountered: