Skip to content

Commit 58ab23f

Browse files
RexJaeschkeBillWagner
authored andcommitted
Update interfaces.md
1 parent 3f902a4 commit 58ab23f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

standard/interfaces.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,11 @@ An interface method declaration that has a *block* as a *method_body* is a defau
371371
372372
The list of requirements for valid combinations of modifiers stated for a class method is extended, as follows:
373373
374-
- A static declaration that is not extern or abstract shall have a *block* as a *method_body*.
375-
- A virtual declaration that is not extern shall have a *block* as a *method_body*.
376-
- A private declaration that is not extern shall have a *block* as a *method_body*.
377-
- A sealed declaration that is not extern shall have a *block* as a *method_body*.
378-
- An async declaration shall have a *block* as a *method_body*.
374+
- A static declaration that is not extern or abstract shall have a *block* as a *method_body*.
375+
- A virtual declaration that is not extern shall have a *block* as a *method_body*.
376+
- A private declaration that is not extern shall have a *block* as a *method_body*.
377+
- A sealed declaration that is not extern shall have a *block* as a *method_body*.
378+
- An async declaration shall have a *block* as a *method_body*.
379379
380380
All formal parameter types of an interface method shall be input-safe ([§17.2.3.2](interfaces.md#17232-variance-safety)), and the return type shall be either `void` or output-safe. In addition, any output or reference formal parameter types shall also be output-safe.
381381
@@ -421,7 +421,9 @@ These rules ensure that any covariant or contravariant usage of the interface re
421421
> This is actually a call to `C.M<E>`. But that call requires that `E` derive from `D`, so type safety would be violated here.
422422
>
423423
> *end example*
424+
<!-- markdownlint-disable MD028 -->
424425
426+
<!-- markdownlint-enable MD028 -->
425427
> *Note*: See §interface-fields for an example that not only shows a static method with default implementation, but as that method is called `Main` and has the right return type and signature, it’s also an entry point! *end note*
426428
427429
A virtual method with implementation declared in an interface may be overridden to be abstract in a derived interface. This is known as ***reabstraction***.

0 commit comments

Comments
 (0)