Support Covariant Return Types#334
Open
huoshan12345 wants to merge 25 commits into
Open
Conversation
Member
阻塞问题评审意见此 PR 合并前需要解决以下两个阻塞问题: 问题 1:多层协变返回继承链无法确定性地解析到叶子重写涉及文件:
核心问题:在 为什么阻塞:代理生成可能绑定到中间重写而非最派生实现,且行为可能依赖于不同运行时的反射枚举顺序。 问题 2:泛型方法协变返回匹配仍未支持涉及文件:
核心问题:泛型参数比较使用引用相等,但被重写的泛型方法具有不同的泛型参数 重要细节:新增的名为泛型覆盖的测试实际上测试的是泛型类型上的非泛型方法,而非泛型方法重写。 为什么阻塞:具有协变返回的泛型虚/接口方法用户仍可能无法命中特化实现。 建议补充的回归测试方向
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes:
AspectCore.Teststo test internal methodsWhat is Covariant Return Types
see https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/covariant-returns