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
Diagnostic ID: CA1845: Use span-based 'string.Concat'
Describe the bug
When concatenating substring calls, CA1845 is triggered. However, when it is triggered inside of an expression tree, the fix for CA1845 (using String.Concat() with .AsSpan()) results in the error: CS8640: Expression tree cannot contain value of ref struct or restricted type.
Expected behavior
I would expect the CA1845 to not trigger in the context of an expression tree.
Actual behavior
The rule is triggered, and results in a complier error when fix is applied.
The text was updated successfully, but these errors were encountered:
Analyzer
Diagnostic ID: CA1845:
Use span-based 'string.Concat'
Describe the bug
When concatenating substring calls, CA1845 is triggered. However, when it is triggered inside of an expression tree, the fix for CA1845 (using String.Concat() with .AsSpan()) results in the error: CS8640:
Expression tree cannot contain value of ref struct or restricted type
.Expected behavior
I would expect the CA1845 to not trigger in the context of an expression tree.
Actual behavior
The rule is triggered, and results in a complier error when fix is applied.
The text was updated successfully, but these errors were encountered: