[Mono-bugs] [Bug 60933][Wis] Changed - [PATCH] Remove literals from static data

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 5 Jul 2004 14:36:46 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=60933

--- shadow/60933	2004-06-30 10:50:06.000000000 -0400
+++ shadow/60933.tmp.31951	2004-07-05 14:36:46.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 60933
 Product: Mono: Runtime
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -20,6 +20,54 @@
 space which must be checked by the gc and takes up additional memory.
 
 ------- Additional Comments From bmaurer@users.sf.net  2004-06-30 10:50 -------
 Created an attachment (id=8410)
 patch
 
+
+------- Additional Comments From bmaurer@users.sf.net  2004-07-05 14:36 -------
+using System;
+using System.Reflection;
+
+class T {
+
+	public const bool a = true;
+	public const byte b = 1;
+	public const sbyte c = 1;
+	public const char d = 'a';
+	public const short e = 1;
+	public const ushort f = 1;
+	public const int g = 1;
+	public const uint h = 1;
+	public const long i = 1;
+	public const ulong j = 1;
+	public const double k = 1;
+	public const float l = 1;
+	public const string m = "la la la";
+	public const string n = null;
+	
+	static void Main ()
+	{
+		X ("a", a);
+		X ("b", b);
+		X ("c", c);
+		X ("d", d);
+		X ("e", e);
+		X ("f", f);
+		X ("g", g);
+		X ("h", h);
+		X ("i", i);
+		X ("j", j);
+		X ("k", k);
+		X ("l", l);
+		X ("m", m);
+		X ("n", n);
+	}
+	
+	static void X (string n, object o)
+	{
+		if (! Object.Equals (typeof (T).GetField (n).GetValue (null), o))
+			Console.WriteLine (n);
+	}
+}
+
+Some confidence inspiring tests :-).