-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Copy link
Labels
Area-CompilersFeature - Collection ArgumentsCollection expression with() argumentsCollection expression with() arguments
Milestone
Description
Championed proposal: dotnet/csharplang#8887
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/collection-expression-arguments.md
Compiler:
Errors
- LangVer behavior
LanguageVersion_* - Obsolete members
-
CollectionBuilderCollectionBuilder_ObsoleteBuilderMethod_* - constructor
CollectionInitializer_ObsoleteConstructor_*
-
- Compiler feature required members
-
CollectionBuilderCollectionBuilder_UseSiteError_Method - constructor
Constructor_UseSiteError_Method
-
-
UnmanagedCallersOnly-
CollectionBuilderCollectionBuilder_UnmanagedCallersOnly
-
- Type with required properties
WithElement_RequiredProperties - Non-accessible construction
-
CollectionBuilderCollectionBuilder_Private|Internal|ProtectedMethod - Constructor
WithElement_Private|Protected|etcConstructor*
-
- File local
CollectionBuildertype - CollectionBuilderFileLocalType1 - File local
CollectionBuilderparameter type - CollectionBuilderFileLocalType2 - Dynamic
- Parameters
-
CollectionBuilder- WithElement_CollectionBuilder_DynamicParameters - constructor
DynamicArguments_04
-
- Arguments
-
CollectionBuilder- WithElement_CollectionBuilder_DynamicArguments - constructor
DynamicArguments_*
-
- Parameters
- Disallowed on array and span types
CollectionExpressionTests_WithElement_ArraysAndSpans -
withinparams:M(with(A, B), C, D)(disallowed) - update
BindCollectionExpressionForErrorRecovery. Tested in TestErrorRecovery_XXX in IOperationTests_ICollectionExpressionOperation. - Expression trees
ExpressionTreeInWithElement - Type parameter constraints
-
CollectionBuilderCollectionBuilder_MultipleBuilderMethods_GenericConstraints*,CollectionBuilder_GenericConstraints - constructor
WithElement_TypeConstraints*
-
- Ref safety
-
CollectionBuilderRefSafety_CollectionBuilderArguments - constuctor
RefSafety_ConstructorArguments
-
- Errors for unsupported for
IListandICollectionparametersIList_With_OptionalParamsAfterCapacity
Behavior
- order of evaluation
-
CollectionBuilderEvaluationOrder_CollectionInitializer* - constructor
EvaluationOrder_CollectionInitializer
-
- Parameter modifiers
-
ref-
CollectionBuilderCollectionBuilder_RefParameter - constructor
WithElement_RefParameters
-
-
out-
CollectionBuilderCollectionBuilder_OutParameter - constructor
WithElement_OutParameters
-
-
in-
CollectionBuilderCollectionBuilder_InParameter - constructor
WithElement_InParameters
-
-
ref readonly-
CollectionBuilderCollectionBuilder_RefReadonlyParameter - constructor - WithElement_RefReadonlyParameter
-
-
params-
CollectionBuilderlots of tests - constructor
WithElement_Params
-
-
scoped-
CollectionBuilderRefSafety_CollectionBuilderArguments - constructor
RefSafety_ConstructorArguments
-
-
UnscopedRef-
CollectionBuilder- WithElement_CollectionBuilder_UnscopedRef - constructor
WithElement_RefParameters, WithElement_UnscopedRef
-
-
- Default parameters
-
CollectionBuilderCollectionBuilder_OptionalParameter* - constructor
CollectionInitializer_OptionalParameter*
-
- nullability analysis - All in CollectionExpressionTests_WithElement_Nullable.cs
-
CollectionBuilder - constructor
-
- __arglist
-
CollectionBuilder- WithElement_CollectionBuilder_ArgList - constructor
Arglist*
-
- interpolation handlers
-
CollectionBuilder- InterpolatedStringHandler_CollectionBuilder - constructor
InterpolatedStringHandler
-
- If you add a new expression that can be nested inside itself, test deeply nesting it. Potentially cut off direct nesting. (N/A. Can't nest this directly deeply).
- Overload resolution
-
CollectionBuilderCollectionBuilder_MultipleBuilderMethods_GenericConstraints* - constructor
WithElement_OverloadResolution*,WithElement_NoMatchingConstructor,WithElement_Constructor_UserDefinedConversion*,WithElement_IncorrectConstructorType
-
- ORPA
-
CollectionBuilderCollectionBuilderOverloadResolutionPriority - constructor
OverloadResolutionPriority
-
- Support for
IListandICollectioncapacity:parameterIList_With_*(covers bothIListandICollection)
Public APIs
-
GetSymbolInfo -
GetSpeculativeSymbolInfo- GetSpeculativeSymbolInfo -
GetMemberGroup(currently returns nothing forwith(...)and: this(...)) -
IOperation - Control flow graph
- API review - Expose 'With-Element' information in ICollectionExpressionOperation #80998
- update compiler test plan
- Document breaking change
- Alert partners of breaking change.
IDE
- completion - WithKeywordRecommenderTests.TestInCollectionExpressionX
- colorization - TotalClassifierTest.TestWithElement
- QuickInfo - SemanticQuickInfoSourceTests.TestWithElementXXX
- formatting - FormattingTests.FormatWithElementX
- GoToDef on
with- CSharpGoToDefinitionTests.TestCSharpGoToWithElementXXX - signature/parameter info while typing in
with- WithElementSignatureHelpProviderTests - FAR on constructor or
Createmethod used bywith- Not planned.
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
Area-CompilersFeature - Collection ArgumentsCollection expression with() argumentsCollection expression with() arguments