Bug 318445 (MONO75461) - [GMCS] type inference wrt. delegate / anonymous method
Summary: [GMCS] type inference wrt. delegate / anonymous method
Status: RESOLVED FIXED
Alias: MONO75461
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-04 22:06 UTC by Ben Maurer
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:24:16 UTC


---- Reported by bmaurer@users.sf.net 2005-07-04 15:06:57 MST ----

GMCS does not compile

class X {
      static void Main ()
      {
	string [] s = { "a", "b", "a" };
	System.Array.FindAll (s, delegate (string str) { return str == "a"; });
      }
}

While csc v2 does.



---- Additional Comments From martin@ximian.com 2005-07-06 11:04:59 MST ----

Fixed in SVN; added gtest-184.cs and gcs0411-7.cs.



---- Additional Comments From martin@ximian.com 2005-07-06 11:05:56 MST ----

To make things clear: we do *not* perform type inference on the
delegate / anonymous method argument, only on the other one and then
check whether the anonymous method is compatible with that.  That's
what the gcs0411-7.cs error test case is for.


Unknown operating system unknown. Setting to default OS "Other".