Overload resolution for FormattableString (bug?) #675
-
Hello, I have three small questions.
public static string L(FormattableString fs)
=> string.Format(fs.Format, fs.GetArguments());
public static string L(string s)
=> s;
public static string L(this FormattableString fs)
{
return string.Format(fs.Format, fs.GetArguments());
} Is the second one really supposed to not work, calling L(...) directly will work though.
I hope someone can explain if this is just an unintended side-effect, or if there's any actual reasoning behind this behaviour. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I read the threads you linked. 99% of the users could live without being able to sub-class FormattableString (they can write a library or something), but bad performance can't be fixed. Really sad. Bad decisions. |
Beta Was this translation helpful? Give feedback.
dotnet/roslyn#173
dotnet/roslyn#518
dotnet/roslyn#8097