Skip to content

Commit b8a0760

Browse files
committed
Review udpates
In conversions, restore the IFormattable/FormattableString conversion about the new handler paragraph. Both are valie. In expression, update Better conversion bullets to prefer the handler-preference rules, then the existing rules under a "does not exactly match" bullet. Fix typo in 12.83. Add a bullet in 12.83 to target the IFormattable/Formattable string conversion around the handler.
1 parent 25ace32 commit b8a0760

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

standard/conversions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ An implicit enumeration conversion permits a *constant_expression* ([§12.26](ex
146146
147147
### 10.2.5 Implicit interpolated string conversions
148148
149+
An implicit interpolated string conversion permits an *interpolated_string_expression* ([§12.8.3](expressions.md#1283-interpolated-string-expressions)) to be converted to `System.IFormattable` or `System.FormattableString` (which implements `System.IFormattable`). When this conversion is applied, a string value is not composed from the interpolated string. Instead an instance of `System.FormattableString` is created, as further described in12.8.3](expressions.md#1283-interpolated-string-expressions).
150+
149151
For any type `T` that is an applicable interpolated string handler typecustInterpStrExpCustHandling), there exists an implicit interpolated string handler conversion to `T` from a non-constant *ISE* ([§12.8.3](expressions.md#1283-interpolated-string-expressions)). This conversion exists, regardless of whether errors are found later when attempting to lower the interpolation using the handler pattern. This ensures that there are predictable and useful errors, and that runtime behavior doesn't change based on the content of an interpolated string.
150152
151153
### 10.2.6 Implicit nullable conversions

0 commit comments

Comments
 (0)