Skip to content

Commit d9615ce

Browse files
authored
Support static abstract members in interfaces
1 parent 74ef7b1 commit d9615ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

standard/patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ relational_pattern
447447

448448
Relational patterns support the relational operators `<`, `<=`, `>`, and `>=` on all of the built-in types that support such binary relational operators with both operands having the same type: `sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `char`, `float`, `double`, `decimal`, `nint`, `nuint`, and enums.
449449

450-
It is a compile-time error if `constant_expression`is `double.NaN`, `float.NaN`, or `null_literal`.
450+
It is a compile-time error if *constant_expression*is `double.NaN`, `float.NaN`, or `null_literal`.
451451

452-
When the input value has a type for which a suitable built-in binary relational operator is defined, the evaluation of that operator is taken as the meaning of the relational pattern. Otherwise, the input value is converted to the type of `constant_expression` using an explicit nullable or unboxing conversion. It is a compile-time error if no such conversion exists. The pattern is considered to not match if the conversion fails. If the conversion succeeds, the result of the pattern-matching operation is the result of evaluating the expression `e «op» v` where `e` is the converted input, «op» is the relational operator, and `v` is the `constant_expression`.
452+
When the input value has a type for which a suitable built-in binary relational operator is defined, the evaluation of that operator is taken as the meaning of the relational pattern. Otherwise, the input value is converted to the type of *constant_expression* using an explicit nullable or unboxing conversion. It is a compile-time error if no such conversion exists. It is a compile-time error if the input type is a type parameter constrained to, or a type inheriting, from `System.Numerics.INumberBase<T>` and the input type has no suitable built-in binary relational operator defined. The pattern is considered to not match if the conversion fails. If the conversion succeeds, the result of the pattern-matching operation is the result of evaluating the expression `e «op» v` where `e` is the converted input, «op» is the relational operator, and `v` is the *constant_expression*.
453453

454454
> *Example*:
455455
>

0 commit comments

Comments
 (0)