-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead
Description
Version Used: 16.9.0 Preview 3
Sample Code:
using System;
struct Point
{
public int X;
public int Y;
public override string ToString() => $"({X}, {Y})";
}
public class App
{
public static void Main()
{
Console.WriteLine($"A Point: {new Point{
X = 1,
Y = 2
}}");
}
}Expected Behavior:
According to csharplang every expression is allowed in an interpolation. So expressions with New-Line trivia should compile.
Actual Behavior:
Code does not compile, just with removing the new lines.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead