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
Product and Version Used:
Roslynator.Analyzera 4.12.4
Steps to Reproduce:
using System.Globalization;publicvoidfoo(){Span<char>bar=stackallocchar[6];
bar.TryWrite(CultureInfo.InvariantInfo,$"foobar",out _);}
Actual Behavior: $"foobar" is marked by RCS1214 as an unnecessary interpolation.
Accepting the code fix and removing the interpolation causes an error:
Expected Behavior:
RCS1214 should not apply to interpolation handler parameters, e.g. this ref TryWriteInterpolatedStringHandler.
Probably simpler just not to recommend it here, but it could also suggest a codefix to do something like "foobar".TryCopyTo(bar); instead.
The text was updated successfully, but these errors were encountered:
Product and Version Used:
Roslynator.Analyzera 4.12.4
Steps to Reproduce:
Actual Behavior:
$"foobar"
is marked by RCS1214 as an unnecessary interpolation.Accepting the code fix and removing the interpolation causes an error:
Expected Behavior:
RCS1214 should not apply to interpolation handler parameters, e.g. this
ref TryWriteInterpolatedStringHandler
.Probably simpler just not to recommend it here, but it could also suggest a codefix to do something like
"foobar".TryCopyTo(bar);
instead.The text was updated successfully, but these errors were encountered: