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

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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