Bug 224 - Code completion cannot handle lambdas properly.
Summary: Code completion cannot handle lambdas properly.
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: High normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2011-08-08 07:02 UTC by Alan McGovern
Modified: 2015-08-20 03:24 UTC (History)
3 users (show)

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 Developer Community or GitHub 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 Alan McGovern 2011-08-08 07:02:29 UTC
I have this interface:

interface ICrashMonitor {
	event EventHandler<CrashEventArgs> CrashDetected;

	void StartMonitoring ();
	void StopMonitoring ();

I write this code:

var monitor = CrashMonitor.Create (); // Calls a factory method to create the item
monitor.CrashDetected += (o, e) => e.$

At the dollar sign MD treats the CrashEventArgs object as if it were a System.Object and offers no code completion for the members of CrashEventArgs. If i use a delegate like: += delegate (object o, CrashEventArgs e) { }, it works exactly as expected.
Comment 1 Mike Krüger 2011-08-08 07:17:31 UTC
y no detection for that - I may have the chance to do something about this with the new code completion code - but that has to wait.
Comment 2 Mike Krüger 2011-12-07 05:06:17 UTC
Fixed in newresolver/added unit test for the case.
Comment 3 Atin 2011-12-29 02:24:50 UTC
Please provide more info or steps to reproduce so that we can validate this issue at our end.