-
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 "static lambdas" #39606
Comments
Please take in mind for an option to not suggest |
@huoyaoyuan this just means: as the user is typing, the completion list should offer the |
Well I misunderstood as an IDE diagnostic like static local functions. |
That sounds like something was simply missed in the test plan. It's normally a requirement that new syntactic forms be supported in intellisense for a lang feature to ship. |
The feature was merged and open test plan follow-ups have tracking issues. I'll go ahead and close the test plan. |
Championed issue: dotnet/csharplang#275
Speclet: https://github.com/dotnet/csharplang/blob/master/proposals/static-lambdas.md
Main PR: #39121
Compiler scenarios
DisallowInNonPreview
)this
(StaticLambdaCannotCaptureInstanceField
,StaticLambdaCannotCaptureParameter
,StaticLambdaCannotReferenceBase
and following)StaticLambdaCanReferenceStaticField
,StaticLambdaCanCallStaticMethod
and following)const
field/local (StaticLambdaCanReferenceConstField
and following)InstanceLambdaCannotHaveLocalsCapturedByInnerStaticLambda
,this
) (StaticLambdaCanHaveLocalsCapturedByInnerInstanceLambda
StaticLambdaCannotReferenceInstanceLocalFunction
,StaticLambdaCanReferenceStaticLocalFunction
,StaticLambdaCannotHaveLocalsCapturedByInnerStaticLambda
,StaticLambdaCanHaveLocalsCapturedByInnerInstanceLocalFunction
): outer and inner, either may be lambda or local function, either may be static or instance, check referencing variables from outer and middle scope.nameof
(can still reference)default(T)
), should be same as local functionsnint
,static delegate
(including parse tree test)static
should not interfere with caching (this falls under the "should not effect emit/validity" umbrella).IsStatic
), verify data flowIAnonymousFunction
, symbol covers need for API)M(static ...)
M(ref static ...)
M(param: static ...)
obj[static ...]
and variantsProductivity
converting static anonymous function to static local functionThis refactoring does not seem to exist for regular anonymous functions.static
keywordLDM
static delegate
(current implementation allows)The text was updated successfully, but these errors were encountered: