-
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 lambda improvements #52192
Comments
Updated with initial test plan for Monday. |
roslyn/src/Workspaces/CSharp/Portable/CodeGeneration/CSharpSyntaxGenerator.cs Lines 1857 to 1867 in 0254fbd
roslyn/src/Workspaces/CSharp/Portable/CodeGeneration/CSharpSyntaxGenerator.cs Lines 1816 to 1842 in 0254fbd
|
So far we haven't heard about any issues on the IDE side. We consider things to be good there, and we'll instead do work here if triggered from user reported issues where 'improved lambdas' aren't working properly for them. |
Thanks for adding the remaining tests @cston. Closing the test plan. |
Proposal: lambda-improvements.md
Branch: features/lambdas
Championed issue (explicit return type, attributes): dotnet/csharplang#4934
Championed issue (direct invocation): dotnet/csharplang#4748
Remaining work items
ref
return types should parse (PR Account for a ref returning lambda as a local variable initializer. #56814)-langversion:9
and earlier #56391)object
and interfaces)Attributes
Parsing
static
lambdasasync
lambdasSemantics
CallerFilePathAttributeCallerLineNumberAttributeCallerMemberNameAttributeLambdaTests.LambdaAttributes_AttributeSemanticModel()
)IDE/Public API
Explicit return type
Syntax
async async(async async) => async
async MyMethod() => null;
on the top level parses as a local function statement with a return type ofasync
static
lambdasvoid
return typevar
return type (reserved)void
returnis
Semantics
return
statement types and declared return typeTypeInference_ExplicitReturnType_01
, ...)OverloadResolutionPerfTests.NestedLambdas_WithParameterAndReturnTypes()
)LambdaTests.LambdaReturnType_SemanticModel()
)LambdaTests.LambdaReturnType_SemanticModel()
)IDE/Public API
static
orasync
)Inferred (natural) delegate type
Syntax
Semantics
revert conditional binding patch from 16.11(ie. revert Infer delegate types with -langversion:preview only #53241)System.MulticastDelegate
and base types and interfacesSystem.Linq.Expressions.Expression<TDelegate>
System.Linq.Expressions.Expression
,System.Linq.Expressions.LambdaExpression
System.MulticastDelegate
and base types and interfacesDirectly invoke lambda expressionsvar
_ = () => {};
(disallowed)Action
orFunc
typesSystem.Delegate
typemodopt
andmodreq
do not affect delegate typeErrorCode.ERR_CannotInferDelegateType
only reported when delegate type is requiredGetTypeInfo()
should return the inferred delegate type for method groups #52874).Type
returnnull
or theAction
/Func
/synthesized delegate type? How does ASP.NET source generator obtain the lambda signature? (see here)GetSymbolInfo()
should return the resolved method from a method group with inferred delegate type #52870)DelegateTypeTests.ClassifyConversionFromExpression()
)ToDisplayString
on synthesized delegate typesIDE/Public API
var
(issue Use implicit/explicit type doesn't work with lambda function types #58404)Open issues
The text was updated successfully, but these errors were encountered: