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
The interpolated string handler spec defines an additive expression as:
"... an additive_expression composed entirely of _interpolated_string_expression_s and using only + operators."
Additive expressions can be converted to handler types. For example: Handler h = $"...." + $"...." + $"....";.
In the current implementation:
($"...." + $"....") + $"...." is also considered an additive expression (ie. the conversion to handler type is allowed)
$"...." + ($"...." + $"....") is not considered an additive expression (ie. the conversion to handler type is disallowed)
The two scenarios should probably be consistent (either allow or disallow the conversion).
Whatever we decide, the spec language should be refined.
The interpolated string handler spec defines an additive expression as:
"... an additive_expression composed entirely of _interpolated_string_expression_s and using only + operators."
Additive expressions can be converted to handler types. For example:
Handler h = $"...." + $"...." + $"....";
.In the current implementation:
($"...." + $"....") + $"...."
is also considered an additive expression (ie. the conversion to handler type is allowed)$"...." + ($"...." + $"....")
is not considered an additive expression (ie. the conversion to handler type is disallowed)The two scenarios should probably be consistent (either allow or disallow the conversion).
Whatever we decide, the spec language should be refined.
Relates to proposal #4487
Relates to test plan dotnet/roslyn#51499
The text was updated successfully, but these errors were encountered: