Предложение включить в следующую версию С# поддержку ковариантных типов возврата. Это может позволить переопределенному методу иметь другой (более высокий по иерархии наследования) тип, чем метод, который он переопределяет.
Выглядит это может примерно так:
https://www.infoq.com/news/2020/01/CSharp-Covariant-Return-Types/
#Covariant, #CSharp, #Proposals
Выглядит это может примерно так:
class Compilation ...
{
virtual Compilation WithOptions(Options options)...
}
class CSharpCompilation : Compilation
{
override CSharpCompilation WithOptions(Options options)...
}
https://www.infoq.com/news/2020/01/CSharp-Covariant-Return-Types/
#Covariant, #CSharp, #Proposals
InfoQ
C# Futures: Covariant Return Types
A frequent API design problem is the inability to use a more specific return type when overriding a method. Proposal 49, which is now a C# 9 candidate, seeks to correct this issue.
Планируемые изменения в .NET 7, которые могут нарушить обратную совместимость.
https://devdigest.today/goto/1879
#net7 #proposals
https://devdigest.today/goto/1879
#net7 #proposals
GitHub
Proposed .NET 7 Breaking Changes · Issue #7131 · dotnet/core
The following list defines breaking changes that are proposed for .NET 7. Ideally, these are implemented no later than Preview 3. FYI: Currently, this list is just my list of proposals. Other folks...