Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open issue: parentheses and additive expressions #5106

Closed
jcouv opened this issue Aug 24, 2021 · 1 comment
Closed

Open issue: parentheses and additive expressions #5106

jcouv opened this issue Aug 24, 2021 · 1 comment
Assignees

Comments

@jcouv
Copy link
Member

jcouv commented Aug 24, 2021

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:

  1. ($"...." + $"....") + $"...." is also considered an additive expression (ie. the conversion to handler type is allowed)
  2. $"...." + ($"...." + $"....") 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

@333fred
Copy link
Member

333fred commented Aug 25, 2021

@333fred 333fred closed this as completed Aug 25, 2021
333fred added a commit to 333fred/roslyn that referenced this issue Sep 11, 2021
333fred added a commit to dotnet/roslyn that referenced this issue Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants