Skip to content

Open issue: parentheses and additive expressions #5106

@jcouv

Description

@jcouv

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions