mail-archives/mono-list/2005-February/025862.html

108 строки
3.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-list] Const weirdness, revisited...
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:tom%40abwaerts.be">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="025844.html">
<LINK REL="Next" HREF="025912.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-list] Const weirdness, revisited...
</H1>
<B>Tom
</B>
<A HREF="mailto:tom%40abwaerts.be"
TITLE="[Mono-list] Const weirdness, revisited...">tom@abwaerts.be
</A><BR>
<I>Sun, 20 Feb 2005 10:48:18 +0100</I>
<P><UL>
<LI> Previous message: <A HREF="025844.html">[Mono-list] Const weirdness, revisited...
</A></li>
<LI> Next message: <A HREF="025912.html">[Mono-list] Const weirdness, revisited...
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#25862">[ date ]</a>
<a href="thread.html#25862">[ thread ]</a>
<a href="subject.html#25862">[ subject ]</a>
<a href="author.html#25862">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>--nextPart2417314.cpzIYKamfS
Content-Type: text/plain;
charset=&quot;iso-8859-15&quot;
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
[Saturday 19 February 2005 18:37] Miguel de Icaza
(Re: [Mono-list] Const weirdness, revisited...):
&gt;<i> &gt; &gt; But, the Microsoft compiler argues by saying:
</I>&gt;<i> &gt; &gt; &quot;error CS0131: The left-hand side of an assignment must be a
</I>&gt;<i> &gt; &gt; variable, property or indexer&quot;
</I>&gt;<i> &gt; &gt; on the line meh=3D10.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Exactly, I *did* check on that. I would expect the same behaviour
</I>&gt;<i> &gt; from Mono, and I think it's quite an obvious bug indeed (i.e. I
</I>&gt;<i> &gt; cannot think of any rational decision that might have been made
</I>&gt;<i> &gt; about this).
</I>&gt;<i>
</I>&gt;<i> Both Mono 1.0.x and Mono 1.1.x produce exactly the same result:
</I>&gt;<i>
</I>&gt;<i> class X {
</I>&gt;<i>
</I>&gt;<i> const int meh =3D 5;
</I>&gt;<i> static void Main ()
</I>&gt;<i> {
</I>&gt;<i> meh =3D 10;
</I>&gt;<i> }
</I>&gt;<i> }
</I>
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: <A HREF="http://tmp.verbreyt.be/files/abwaerts.asc">http://tmp.verbreyt.be/files/abwaerts.asc</A>
--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--
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="025844.html">[Mono-list] Const weirdness, revisited...
</A></li>
<LI> Next message: <A HREF="025912.html">[Mono-list] Const weirdness, revisited...
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#25862">[ date ]</a>
<a href="thread.html#25862">[ thread ]</a>
<a href="subject.html#25862">[ subject ]</a>
<a href="author.html#25862">[ author ]</a>
</LI>
</UL>
</body></html>