mono/mono — pull request #967 by eburgos (2014-03-22 15:05:02+00:00)
Title: [mcs] Fix wrong case for error CS0177

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.

Commit 73715d5 adds a case in errors with this case where it wrongfully emits an error.
Commit 5433eb3 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. So at this point the prior test case was breaking with the following message:
```
cs0177-15.cs...	REGRESSION (CORRECT ERROR -> NO ERROR)
```

Commit 13d1e8d removes the negative test off mcs/errors
Commit e64d495 adds tests/gtest-607.cs and modifies tests/ver-il-net_4_5.xml by adding it's IL info.

I hope I didn't miss anything.

Regards,