[Mono-list] Const weirdness, revisited...
Tom
tom@abwaerts.be
Sun, 20 Feb 2005 10:48:18 +0100
--nextPart2417314.cpzIYKamfS
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
[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=3D10.
> >
> > 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 =3D 5;
> static void Main ()
> {
> meh =3D 10;
> }
> }
Well, if you just move the const int declaration into Main(), there's no=20
warning or error any more.
Anyway, as Robert Jordan said it's fixed in SVN, I guess I'll just=20
apologize for the fuzz... :-)
Thanks, y'all,
Tom
=2D-=20
key: http://tmp.verbreyt.be/files/abwaerts.asc
--nextPart2417314.cpzIYKamfS
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQBCGFzoLssppf5L8NYRAgzvAJ4loA90ZN8G2L6E9XXTcqeRI4FdYQCfW2b+
+ntTNX3hJBiDCii/J/JQibA=
=cSg5
-----END PGP SIGNATURE-----
--nextPart2417314.cpzIYKamfS--