[Saturday 19 February 2005 18:37] Miguel de Icaza
        (Re: [Mono-list] Const weirdness, revisited...):

> > > But, the Microsoft compiler argues by saying:
> > > "error CS0131: The left-hand side of an assignment must be a
> > > variable, property or indexer"
> > > on the line meh=10.
> >
> > Exactly, I *did* check on that. I would expect the same behaviour
> > from Mono, and I think it's quite an obvious bug indeed (i.e. I
> > cannot think of any rational decision that might have been made
> > about this).
>
> Both Mono 1.0.x and Mono 1.1.x produce exactly the same result:
>
> class X {
>
> const int meh = 5;
> static void Main ()
> {
> meh = 10;
> }
> }

Well, if you just move the const int declaration into Main(), there's no 
warning or error any more.

Anyway, as Robert Jordan said it's fixed in SVN, I guess I'll just 
apologize for the fuzz... :-)

Thanks, y'all,
Tom

-- 
key: http://tmp.verbreyt.be/files/abwaerts.asc

Attachment: pgpPdjLJ4yXlz.pgp
Description: PGP signature

Reply via email to