[Mono-list] Const weirdness, revisited...
Miguel de Icaza
miguel@ximian.com
Sat, 19 Feb 2005 12:37:58 -0500
Hello,
> > 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;
}
}
Please post a full sample