Skip to content
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 Overload Resolution Priority #74131

Open
26 of 31 tasks
333fred opened this issue Jun 24, 2024 · 1 comment
Open
26 of 31 tasks

Test Plan for Overload Resolution Priority #74131

333fred opened this issue Jun 24, 2024 · 1 comment

Comments

@333fred
Copy link
Member

333fred commented Jun 24, 2024

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jun 24, 2024
@jaredpar jaredpar added this to the 17.12 milestone Jun 27, 2024
@jaredpar jaredpar added Bug Feature Request and removed untriaged Issues and PRs which have not yet been triaged by a lead Bug labels Jun 27, 2024
@jaredpar
Copy link
Member

@333fred make sure to create an issue label we can use for this feature and attach it to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants