Bug 27043 - Compiler crash when when using async and wrong amount of function arguments in delegate
Summary: Compiler crash when when using async and wrong amount of function arguments i...
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 3.12.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2015-02-13 09:13 UTC by Andrius Bentkus
Modified: 2015-02-13 11:42 UTC (History)
1 user (show)

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

contains exception trace (8.63 KB, text/plain)
2015-02-13 09:13 UTC, Andrius Bentkus

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:

Description Andrius Bentkus 2015-02-13 09:13:47 UTC
Created attachment 9825 [details]
contains exception trace

This crashes the compiler:

using System;
using System.Threading.Tasks;

namespace Test
	class MainClass
		public static void Run(Func<Task> func)

		public static void Main(string[] args)
			Run(async () => {
				Function(async (handle) => {

		public static void Function(Action<Exception, object> callback)

Notice that we pass async (handle) with one argument, though the real definition is Action<Exception, object> and therefor has 2 arguments.
I attached a an exception trace.
Comment 1 Andrius Bentkus 2015-02-13 09:14:49 UTC
additional thanks to akopelinger who helped on the irc channel to water problem down
Comment 2 Marek Safar 2015-02-13 11:42:59 UTC
Fixed in master