Skip to content

Commit e0096db

Browse files
Nigel-Ecmajskeet
authored andcommitted
Apply suggestions from code review
1 parent 2c0530d commit e0096db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

standard/classes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,9 +2158,8 @@ The *ref_return_type* of a returns-by-ref method declaration specifies the type
21582158

21592159
A generic method is a method whose declaration includes a *type_parameter_list*. This specifies the type parameters for the method. The optional *type_parameter_constraints_clause*s specify the constraints for the type parameters.
21602160

2161-
A generic *method_declaration* for an explicit interface member implementation shall not have any *type_parameter_constraints_clause*s; the declaration inherits any constraints from the constraints on the interface method.
2161+
A generic *method_declaration*, either with an `override` modifier, or for an explicit interface member implementation, inherits type parameter constraints from the overridden method or interface member respectively. Such declarations may only have *type_parameter_constraints_clause*s containing the *primary_constraint*s `class` and `struct`, the meaning of which in this context is defined in [§15.6.5](classes.md#1565-override-methods) and [§18.6.2](interfaces.md#1862-explicit-interface-member-implementations) for overriding methods and explicit interface implementations respectively.
21622162

2163-
Similarly, in the absence of *type_parameter_constraints_clause*s, a method declaration with the `override` modifier inherits any constraints from the virtual method being overridden. The *member_name* specifies the name of the method.
21642163

21652164
The *member_name* specifies the name of the method. Unless the method is an explicit interface member implementation ([§18.6.2](interfaces.md#1862-explicit-interface-member-implementations)), the *member_name* is simply an *identifier*.
21662165

0 commit comments

Comments
 (0)