From 3ae0837f03f1fb92c94b9235c232f567bbc6afa2 Mon Sep 17 00:00:00 2001 From: zacharylayne Date: Sat, 6 Jan 2024 04:17:01 -0800 Subject: [PATCH] Update static-abstracts-in-interfaces.md to Fix Reference to Incorrect Type In [Static abstract members in interfaces - Motivation](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/static-abstracts-in-interfaces#motivation), the line beginning with `static Int32 I.operator +` won't work: `I` is not the correct type. `I` should be `IAddable` instead. --- proposals/csharp-11.0/static-abstracts-in-interfaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/csharp-11.0/static-abstracts-in-interfaces.md b/proposals/csharp-11.0/static-abstracts-in-interfaces.md index ebb2958659..6d045a6204 100644 --- a/proposals/csharp-11.0/static-abstracts-in-interfaces.md +++ b/proposals/csharp-11.0/static-abstracts-in-interfaces.md @@ -25,7 +25,7 @@ interface IAddable where T : IAddable // Classes and structs (including built-ins) can implement interface struct Int32 : …, IAddable { - static Int32 I.operator +(Int32 x, Int32 y) => x + y; // Explicit + static Int32 IAddable.operator +(Int32 x, Int32 y) => x + y; // Explicit public static int Zero => 0; // Implicit }