The compiler does not flag the code as an error when missing parentheses for extension methods that embed string interpolation #12547
Labels
💥 regression-release
Regression from a public release
untriaged
The team needs to look at this issue in the next triage
.NET version
.NET SDK 10.0.100-alpha.1.24573.1
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, it's a regression issue, it works in .NET 5.0, but does not work in .NET 6.0 and latest 10.0.
Issue description
When miss the parentheses for an extension method that embeds string interpolation, the compiler does not flag the code as an error and the code compiles without errors
.NET 10.0 (.NET 8.0 and .NET 9.0 with the same results)
.NET 7.0 (.NET 6.0 results are the same)
.NET 5.0
Steps to reproduce
More info:
The initial feedback ticket is: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2307287
The text was updated successfully, but these errors were encountered: