Bug 36589 - "Compiler crashed with code 1" when awaiting in interpolated string
Summary: "Compiler crashed with code 1" when awaiting in interpolated string
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2015-12-04 12:40 UTC by Markus Mayer
Modified: 2015-12-07 14:30 UTC (History)
1 user (show)

See Also:
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

Note You need to log in before you can comment on or make changes to this bug.