Skip to content

Test Plan for Overload Resolution Priority #74131

@333fred

Description

@333fred

Championed issue: dotnet/csharplang#7706
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/overload-resolution-priority.md

C# Compiler

  • spec: confirm LangVer behavior
  • spec: confirm for local functions,
  • effect in invocation
    • higher values win, lower values lose, default value is zero, same values remain ambiguous
    • pruning happens on applicable candidates
    • applies to extensions
    • in source and metadata (changes in overrides in metadata have no effect)
    • LangVer doesn't affect overload resolution
  • effect in object creation and attributes
  • effect in delegate conversion
  • effect on properties
    • indexers
    • indexed properties
  • effect in unary and binary operators
  • no effect in function type (var x = A.B; with multiple B candidates)
  • attribute application
    • LangVer
    • error on overrides (even those restating priority) and explicit interface implementations
    • error on accessors
    • cycles
    • applied twice
    • applied on partial method or indexer
    • nothing on local functions,
    • spec: error on lambdas, destructors, conversion operators, static constructors
  • public API? (not planned yet)
  • BCL types (added)
  • notify other teams/languages
  • expression tree. Expression<> x = (a) => A.B(a); // priority should be honored, silent source break like params? can yield an error identify and document known scenario, notify BCL team (apply with care)
  • interpolation handlers
  • query syntax

VB Compiler

  • TBD (we'll plan and implement in .NET 9)

Productivity

No IDE impact

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions