[Mono-list] Important difference with Microsoft compiler

Gustavo García Bernardo ggb@tid.es
Fri, 14 Mar 2003 16:02:29 +0100


I tried with mcs 0.19 and it compiles, now I tried with 0.23 and it works
like Microsoft. Then, I supose this is the correct way of work.

G.

> -----Mensaje original-----
> De: mono-list-admin@lists.ximian.com
> [mailto:mono-list-admin@lists.ximian.com]En nombre de Artur Brodowski
> Enviado el: viernes, 14 de marzo de 2003 12:42
> Para: mono-list@lists.ximian.com
> Asunto: Re: [Mono-list] Important difference with Microsoft compiler
>
>
> On Fri, 14 Mar 2003 12:26:01 +0100
> Gustavo García Bernardo <ggb@tid.es> wrote:
> > using System;
> > namespace ConsoleApplication1
> > {
> > class Class1
> > {
> > static void Main(string[] args)
> > {
> >   for (int i=0;i<10;i++)
> >   {
> >     A a = new A();
> >   }
> >   A a = new A();
> > }
> > }
> > class A
> > {
> > }
> > }
>
> and this is what i get (mono/mcs 0.23):
>
> test.cs(13) error CS0136: A local variable named `a' cannot be
> declared in this
> scope since it would give a different meaning to `a', which is
> already used in
> a `child' scope to denote something else
> Compilation failed: 1 error(s), 0 warnings
>
> regards,
> artb.
> --
> only so many songs can be sung with two lips two lungs and one tongue
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list