Skip to content

Test Plan for Partial Events and Constructors #76859

@jjonescz

Description

@jjonescz

Champion issue: dotnet/csharplang#9058
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-14.0/partial-events-and-constructors.md
Feature branch: https://github.com/dotnet/roslyn/tree/features/PartialEventsCtors

  • language version (LangVersion)
    • partial event
    • constructor: partial treated as type previously
  • partial modifier location
    • after event
    • after accessibility modifier
    • on accessors
  • in non-partial class or struct (NotInPartialType)
  • in interface (InInterface*)
  • missing implementation or declaration (Missing*)
  • duplicate implementation or declaration (Duplicate*)
  • static constructor (StaticPartialConstructor_*)
  • constructor initializer: this, base (ConstructorInitializers_)
  • primary constructor (PrimaryConstructor_*)
    • with constructor initializer
  • extern (Extern_*)
  • abstract (Abstract)
  • explicit interface implementation event (ExplicitInterfaceImplementation)
  • partial event in interface:
  • event initializers (EventInitializer_*)
    • multiple declarators and initializers
  • missing accessors (EventAccessorMissing)
  • Windows runtime event (WinRtEvent)
  • attributes (Attributes*)
    • combined from parts
    • duplicate diagnostics
    • event attribute targets
    • ObsoleteAttribute
    • SkipLocalsInitAttribute (AttributeTests_WellKnownAttributes.SkipLocalsInit_*Event*)
    • caller-info attributes apply from definition only
    • nullable attributes
  • mismatched signatures (Difference_*)
    • static and instance
    • accessibility
    • event type
    • parameter type, ref kind, name, scoped, params, default parameter value
    • tuple element names (Difference_*Type)
    • nullability
    • unsafe
    • virtual, override, sealed, new
  • partial event is not field-like
    • no backing field (Metadata)
    • use +=, -=, but not as a value (Use_EventAsValue)
  • defining declaration used for: (Difference_ParameterNames)
    • lookup
    • metadata emit
  • doc comments (DocumentationCommentCompilerTests.PartialEvent_*, PartialConstructor_*)
    • on one or both parts
    • invalid comments
    • paramref when parameter names differ
  • public API: Public API for partial events #77203
    • IEventSymbol.*Partial*
    • GetDeclaredSymbol
  • breaking change (ReturningPartialType_*)
  • EE: evaluate partial constructor
  • EnC: changes to partial implementation

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions