-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Overload Resolution Priority #74190
Overload Resolution Priority #74190
Conversation
This feature is small enough that, rather than do a full feature branch with multiple PRs, I've just done it as a single PR. I don't really recommend a commit-by-commit review here, I'll go through and comment on the actually interesting parts of the implementation. Most of it is actually just tests and attribute decoding boilerplate. |
src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolution.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Symbols/Source/SourceMethodSymbolWithAttributes.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolution.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolution.cs
Outdated
Show resolved
Hide resolved
…solution-priority * upstream/main: (184 commits) Disable BuildWithNetFrameworkHostedCompiler (dotnet#74299) Avoid using constants for large string literals (dotnet#74305) Adjust lowering of a string interpolation in an expression lambda to not use expanded non-array `params` collection in Format/Create calls. (dotnet#74274) Consolidate test Span sources (dotnet#74281) Allow Document.FilePath to be set to null (dotnet#74290) Update Directory.Build.rsp Remove fallback options from IdeAnalyzerOptions (dotnet#74235) Fix msbuild issue Improve parser recovery around nullable types in patterns (dotnet#72805) Syntax formatting options (dotnet#74223) Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2490585 (dotnet#74287) fix (dotnet#74276) Remove more fix (dotnet#74237) Fix scenario where lightbulbs weren't being displayed Reduce closures allocated during invocation of CapturedSymbolReplacement.Replacement (dotnet#74258) Reduce allocations in SymbolDeclaredCompilationEvent (dotnet#74250) remove type that now serves no purpose Remove uncalled method Remove more unused code ...
Refers to: docs/Language Feature Status.md:13 in c0c1730. [](commit_id = c0c1730, deletion_comment = False) |
src/Compilers/CSharp/Portable/Binder/Semantics/OverloadResolution/OverloadResolution.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit3/OverloadResolutionPriorityTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 24)
…solete attributes during early attribute binding: this isn't good, because it will cause us to throw out the bound attribute data we found during early binding. Depending on the order we bind constructors in, this can cause a race condition in the binding of overload resolution priority. Thankfully, this was racy enough that it failed a couple of times during CI, and I was able to explicitly reproduce the failure by pulling on attributes on one constructor or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 26)
This implements the
Overload Resolution Priority
language feature.Test Plan: #74131
Champion issue: dotnet/csharplang#7706
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/overload-resolution-priority.md