Bug 34251 - Internal Compiler Error when using 'this' in a nested closure context with async/await
Summary: Internal Compiler Error when using 'this' in a nested closure context with as...
Status: RESOLVED DUPLICATE of bug 34168
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-09-24 14:32 UTC by mag@xamarin.com
Modified: 2015-10-05 10:11 UTC (History)
3 users (show)

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


Attachments
Solution with the repro isolated (7.12 MB, application/zip)
2015-09-24 14:32 UTC, mag@xamarin.com
Details
Class library with a clear repro (7.21 KB, application/zip)
2015-09-24 15:24 UTC, mag@xamarin.com
Details


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 DUPLICATE of bug 34168

Description mag@xamarin.com 2015-09-24 14:32:34 UTC
Created attachment 13059 [details]
Solution with the repro isolated

When using nested lambda expressions in an async context and referencing to 'this' inside the closure, an Internal Compiler error is received, with this information:

Build FAILED.
Errors:

(Build) ->
/Library/Frameworks/Mono.framework/Versions/4.2.0/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->
  error CS0584: Internal compiler error: Object reference not set to an instance of an object

To repro this issue, there is an isolated class library attached to this bug.
It's very isolated and allow to get the exact repro. There is also a comment in the code with a hint to get the library building without errors.

This could hopefully help on finding the root cause.
Comment 1 mag@xamarin.com 2015-09-24 15:23:32 UTC
Comment on attachment 13059 [details]
Solution with the repro isolated

This solution has been corrupted while uploading.
Comment 2 mag@xamarin.com 2015-09-24 15:24:32 UTC
Created attachment 13061 [details]
Class library with a clear repro
Comment 3 Marek Safar 2015-10-05 10:11:49 UTC

*** This bug has been marked as a duplicate of bug 34168 ***