You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing copying modopts from overridden operator (Increment_147_CopyModifiers, CompoundAssignment_01510_CopyModifiers, CompoundAssignment_01520_CopyModifiers)
Hiding with/without new (warnings) (Increment_054_NewAllowedInInterface_WRN_NewRequired, Increment_055_NewAllowedInClass_WRN_NewRequired, CompoundAssignment_00540_NewAllowedInInterface_WRN_NewRequired, CompoundAssignment_00550_NewAllowedInClass_WRN_NewRequired)
Nullable mismatch on override (CompoundAssignment_01530_NullableMismatchOnOverride)
Nullability mismatch on operands (Increment_089_Consumption_NullableAnalysis, CompoundAssignment_00890_Consumption_NullableAnalysis, CompoundAssignment_00891_Consumption_NullableAnalysis, Increment_089_Consumption_NullableAnalysis)
Test instance operator in catch filter (Increment_148_Consumption_InCatchFilter, CompoundAssignment_01540_Consumption_InCatchFilter)
Operator methods attributed with Unmanaged callers only (CompoundAssignment_00880_Consumption_UnmanagedCallersOnly, Increment_088_Consumption_UnmanagedCallersOnly)
Use in DebuggerDisplay
Consumption
Both instance and static present for increment (Increment_093_Consumption_RegularVsOperator, CompoundAssignment_00930_Consumption_RegularVsOperator)
Checked vs nonchecked (CompoundAssignment_00800_Consumption_CheckedVersionInRegularContext, Increment_080_Consumption_CheckedVersionInRegularContext)
Reference safety (CompoundAssignment_00740_Consumption_RefSafety through CompoundAssignment_00753_Consumption_RefSafety)
Bad operator detection (CompoundAssignment_00900_Consumption_BadOperator through CompoundAssignment_00912_Consumption_BadOperator, Increment_090_Consumption_BadOperator, Increment_091_Consumption_BadOperator)
Shadowing (CompoundAssignment_00810_Consumption_Shadowing through CompoundAssignment_00830_Consumption_Shadowing, Increment_081_Consumption_Shadowing through Increment_083_Consumption_Shadowing)
User Defined Compound Assignment Test Plan
Championed proposal: dotnet/csharplang#9101
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-14.0/user-defined-compound-assignment.md
Feature branch: https://github.com/dotnet/roslyn/tree/features/UserDefinedCompoundAssignment
SyntaxFacts.IsOverloadableCompoundAssignmentOperator(SyntaxKind)CompoundAssignment_01380_VisualBasic,CompoundAssignment_01390_VisualBasic,CompoundAssignment_01400_VisualBasic_Checked,CompoundAssignment_01410_VisualBasic,CompoundAssignment_01420_VisualBasic_Checked)Increment_087_Consumption_Obsolete,CompoundAssignment_00870_Consumption_Obsolete)CompoundAssignment_00022_MustBePublic_ExplicitAccessibility,CompoundAssignment_01440_MetadataValidation,Increment_002_MustBePublic_ExplicitAccessibility,Increment_144_MetadataValidation)CompoundAssignment_00010,CompoundAssignment_00021_ImplicitlyPublicInInterface,Increment_001)Increment_0XX_AllowedInY, CompoundAssignment_0XX_AllowedInY`)Increment_0XX_NotAllowedInY, CompoundAssignment_0XX_NotAllowedInY`)Increment_003_MustReturnVoid,Increment_004_MustReturnVoid_Checked,CompoundAssignment_00030_MustReturnVoid,CompoundAssignment_00040_MustReturnVoid_Checked)CompoundAssignment_00013_Not_Static)Increment_009_AbstractAllowedInClassAndInterface,CompoundAssignment_00090_AbstractAllowedInClassAndInterface)Increment_001,CompoundAssignment_00010)static abstractnot allowed increment/decrement (Increment_018_AbstractNotAllowedInClass_OnStatic,Increment_019_AbstractNotAllowedInStruct)Increment_012_AbstractCanBeImplementedExplicitlyInClassAndStruct,Increment_013_AbstractCanBeImplementedImplicitlyInClassAndStruct,CompoundAssignment_00120_AbstractCanBeImplementedExplicitlyInClassAndStruct,CompoundAssignment_00130_AbstractCanBeImplementedImplicitlyInClassAndStruct)CompoundAssignment_01431_MetadataValidation)CompoundAssignment_00900_Consumption_BadOperator,CompoundAssignment_00910_Consumption_BadOperator)Increment_033_OverrideAllowedInClass,CompoundAssignment_00330_OverrideAllowedInClass,CompoundAssignment_00331_OverrideAllowedInClass)new(warnings) (Increment_054_NewAllowedInInterface_WRN_NewRequired,Increment_055_NewAllowedInClass_WRN_NewRequired,CompoundAssignment_00540_NewAllowedInInterface_WRN_NewRequired,CompoundAssignment_00550_NewAllowedInClass_WRN_NewRequired)Increment_089_Consumption_NullableAnalysis,CompoundAssignment_00890_Consumption_NullableAnalysis,CompoundAssignment_00891_Consumption_NullableAnalysis,Increment_089_Consumption_NullableAnalysis)CompoundAssignment_00880_Consumption_UnmanagedCallersOnly,Increment_088_Consumption_UnmanagedCallersOnly)DebuggerDisplayIncrement_093_Consumption_RegularVsOperator,CompoundAssignment_00930_Consumption_RegularVsOperator)CompoundAssignment_00800_Consumption_CheckedVersionInRegularContext,Increment_080_Consumption_CheckedVersionInRegularContext)CompoundAssignment_00740_Consumption_RefSafetythroughCompoundAssignment_00753_Consumption_RefSafety)CompoundAssignment_00900_Consumption_BadOperatorthroughCompoundAssignment_00912_Consumption_BadOperator,Increment_090_Consumption_BadOperator,Increment_091_Consumption_BadOperator)CompoundAssignment_01030_Consumption_Implementation,Increment_103_Consumption_Implementation)CompoundAssignment_01040_Consumption_Overriding,Increment_104_Consumption_Overriding)CompoundAssignment_00810_Consumption_ShadowingthroughCompoundAssignment_00830_Consumption_Shadowing,Increment_081_Consumption_ShadowingthroughIncrement_083_Consumption_Shadowing)CompoundAssignment_00850_Consumption_Ambiguity,Increment_085_Consumption_Ambiguity)CompoundAssignment_01470_InterpolatedStringHandlerArgument)CompoundAssignment_01450_Consumption_OverloadResolutionPriority,CompoundAssignment_01460_Consumption_OverloadResolutionPriority_CheckedContext)c?.Value += blahfeature (*_Consumption_ConditionalAccessTarget)Issue to reserve new operator names - dotnet/runtime#114930
Issues from IDE test pass:
staticmodifier for assignment operatorsstaticand doesn't addoverridemodifier for an assignment operator