You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: standard/expressions.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1000,10 +1000,11 @@ In case the parameter type sequences `{P₁, P₂, ..., Pᵥ}` and `{Q₁, Q₂
1000
1000
1001
1001
#### 11.6.4.4 Better conversion from expression
1002
1002
1003
-
Given an implicit conversion `C₁` that converts from an expression `E` to a type `T₁`, and an implicit conversion `C₂` that converts from an expression `E` to a type `T₂`, `C₁` is a better conversion than `C₂` if one of the following holds:
1003
+
Given an implicit conversion `C₁` that converts from an expression `E` to a type `T₁`, and an implicit conversion `C₂` that converts from an expression `E` to a type `T₂`, `C₁` is a ***better conversion*** than `C₂` if one of the following holds:
1004
1004
1005
1005
- `E` exactly matches `T₁` and `E` does not exactly match `T₂` ([§11.6.4.5](expressions.md#11645-exactly-matching-expression))
1006
1006
- `E` exactlymatchesbothorneitherof `T₁` and `T₂`, and `T₁` isabetterconversiontargetthan `T₂` ([§11.6.4.6](expressions.md#11646-better-conversion-target))
1007
+
- `E` isamethodgroup ([§11.2](expressions.md#112-expression-classifications)), `T₁` iscompatible ([§19.4](delegates.md#194-delegate-compatibility)) withthesinglebestmethodfromthemethodgroupfor conversion `C₁`, and `T₂` is not compatible with the single best method from the method group for conversion `C₂`
1007
1008
1008
1009
#### 11.6.4.5 Exactly matching expression
1009
1010
@@ -1018,16 +1019,15 @@ Given an expression `E` and a type `T`, `E` ***exactly matches*** `T` if one of
1018
1019
1019
1020
#### 11.6.4.6 Better conversion target
1020
1021
1021
-
Givenanexpression `E` andtwotypes `T₁` and `T₂`, `T₁` isa ***betterconversiontarget*** than `T₂` for `E` ifoneofthefollowingholds:
1022
+
Giventwotypes `T₁` and `T₂`, `T₁` isa ***betterconversiontarget*** than `T₂` ifoneofthefollowingholds:
1022
1023
1023
-
-Animplicitconversionfrom `T₁` to `T₂` exists
1024
+
-Animplicitconversionfrom `T₁` to `T₂` existsandnoimplicitconversionfrom `T₂` to `T₁` exists
1024
1025
- `T₁` is `Task<S₁>`, `T₂` is `Task<S₂>`, and `S₁` isabetterconversiontargetthan `S₂`
1025
1026
- `T₁` is `S₁` or `S₁?` where `S₁` isasignedintegraltype, and `T₂` is `S₂` or `S₂?` where `S₂` isanunsignedintegraltype. Specifically:
1026
1027
- `S₁` is `sbyte` and `S₂` is `byte`, `ushort`, `uint`, or `ulong`
1027
1028
- `S₁` is `short` and `S₂` is `ushort`, `uint`, or `ulong`
1028
1029
- `S₁` is `int` and `S₂` is `uint`, or `ulong`
1029
1030
- `S₁` is `long` and `S₂` is `ulong`
1030
-
- `E` isamethodgroupconversion ([§10.8](conversions.md#108-method-group-conversions)) and `T₁` iscompatible ([§19.4](delegates.md#194-delegate-compatibility)) withthesinglebestmethodfromthemethodgroup
0 commit comments