[Mono-devel-list] Bug with control-flow-analysis

Gonzalo Paniagua Javier gonzalo at ximian.com
Tue Jul 29 19:31:52 EDT 2003


El mar, 29-07-2003 a las 22:35, Hervé Poussineau escribió:
> Hello everybody,
> 
> I have a bug when compiling following code:
> class TestClass
> {
>  public static void Main()
>  {
>   int a;
>   method(out a);
>  }
> 
>  public static bool method(out int a)
>  {
>   try
>   {
>    a = 0;
>    return true;
>   }
>   catch (System.Exception)
>   {
>    a = -1;
>    return false;
>   }
>  }
> }
> 
> mcs reports:
> >mcs bug.cs
> bug.cs(21) error CS0177: The out parameter `a' must be assigned before
> control leave the current method.
> Compilation failed: 1 error(s), 0 warnings
> 
> whereas csc works fine.

Can you put this info in a bug report at http://bugzilla.ximian.com?

Thanks in advance.

-Gonzalo





More information about the Mono-devel-list mailing list