Skip to content

Commit 35f190d

Browse files
authored
Update interfaces.md
1 parent 24c0c64 commit 35f190d

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
@@ -368,11 +368,11 @@ An interface method declaration that has a *block* as a *method_body* is a defau
368368
369369
The list of requirements for valid combinations of modifiers stated for a class method is extended, as follows:
370370
371-
- A static declaration that is not extern or abstract shall have a *block* as a *method_body*.
372-
- A virtual declaration that is not extern shall have a *block* as a *method_body*.
373-
- A private declaration that is not extern shall have a *block* as a *method_body*.
374-
- A sealed declaration that is not extern shall have a *block* as a *method_body*.
375-
- An async declaration shall have a *block* as a *method_body*.
371+
- A static declaration that is not extern or abstract shall have a *block* as a *method_body*.
372+
- A virtual declaration that is not extern shall have a *block* as a *method_body*.
373+
- A private declaration that is not extern shall have a *block* as a *method_body*.
374+
- A sealed declaration that is not extern shall have a *block* as a *method_body*.
375+
- An async declaration shall have a *block* as a *method_body*.
376376
377377
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.
378378
@@ -415,7 +415,9 @@ These rules ensure that any covariant or contravariant usage of the interface re
415415
> 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.
416416
>
417417
> *end example*
418+
<!-- markdownlint-disable MD028 -->
418419
420+
<!-- markdownlint-enable MD028 -->
419421
> *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*
420422
421423
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)