mono/mono — pull request #969 by eburgos (2014-03-23 17:54:16+00:00)
Title: [mcs] Fix wrong case for error CS0177 (squashed)

This is a squashed version of #967

While trying to compile with mono a project I had in Visual Studio I found a case where the compiler emits a CS0177 *The out parameter `b' must be assigned to before control leaves the current method*

This error is not emitted by .net's compiler so I started to look at the code. The code is similar to what follows:

```
using System;

public class C
{
public C (out string b)
{
b = "";
}
public string D () {
return "";
}
}
public class A
{
public Func E (out string b)
{
return new C (out b).D;
}
static void Main () {
}
}
```
As you can see, ```A.E``` returns Func, so this ```new C(out b).D``` in the code is called an ```ImplicitDelegateCreation```.
The problem I saw is that ```DelegateCreation``` class didn't implement ```FlowAnalysis``` method so it wasn't checking it's ```method_group``` property and validating that ```out b``` parameter was being filled before returning control.

This commit implements FlowAnalysis in DelegateCreation covering the following cases:
```
return new C (out b).D;
```
This is ImplicitDelegateCreation class

and

```
return new Func (new C (out b).D);
```
This is NewDelegate class.
Both cases were throwing a wrong error and at this point it's fixed.

I hope I didn't miss anything.

Regards,