Bug 36589

Summary: "Compiler crashed with code 1" when awaiting in interpolated string
Product: [Mono] Compilers Reporter: Markus Mayer <widemeadows>
Component: C#Assignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:

Description Markus Mayer 2015-12-04 12:40:53 UTC
This one's a problem that didn't occur when building the project in Visual Studio, i.e. Microsoft's C# 6 compiler against the .NET runtime, but occurred when we tried to build the same solution in Xamarin Studio on a mac.

Basically the compiler dies with a "code 1" error (and no helpful output) when it occurs an await within an interpolated string.

So, this code introduces the crash:

private async Task<int> Foo() 
{
    await Task.Delay(1);
    return 42;
}
 
private async Task Bar()
{
    Console.WriteLine($"Something {await Foo()}");
}

while the following code doesn't (as expected):

private async Task Bar()
{
    var foo = await Foo();
    Console.WriteLine($"Something {foo}");
}
Comment 1 Marek Safar 2015-12-07 14:30:07 UTC
Fixed in master