[Mono-devel-list] Error message patch

David Sheldon dave-monolist at earth.li
Sat Jan 3 05:19:31 EST 2004


The error message for CS0077 is missing a bracket:

  $ mcs errors/cs0077.cs 
  errors/cs0077.cs(10) error CS0077: The as operator should be used with
  a reference type only (ErrorCS0077+Foo is a value type
                        ^
See, a mismatched "(" in the error message.

Applying the attached patch, you get 
  $ mcs errors/cs0077.cs 
  errors/cs0077.cs(10) error CS0077: The as operator should be used with
  a reference type only (ErrorCS0077+Foo is a value type)

This is purely a cosmetic patch. Let me know if you can think of any
reason not to commit it?

David
-- 
"If you want to travel around the world and be invited to speak at a lot
of different places, just write a Unix operating system."
(By Linus Torvalds)
-------------- next part --------------
Index: gmcs/expression.cs
===================================================================
RCS file: /cvs/public/mcs/gmcs/expression.cs,v
retrieving revision 1.16
diff -u -r1.16 expression.cs
--- gmcs/expression.cs	4 Dec 2003 19:18:07 -0000	1.16
+++ gmcs/expression.cs	3 Jan 2004 10:05:17 -0000
@@ -1242,7 +1242,7 @@
 
 			if (TypeManager.IsValueType (probe_type)){
 				Report.Error (77, loc, "The as operator should be used with a reference type only (" +
-					      TypeManager.CSharpName (probe_type) + " is a value type");
+					      TypeManager.CSharpName (probe_type) + " is a value type)");
 				return null;
 			
 			}
Index: gmcs/ChangeLog
===================================================================
RCS file: /cvs/public/mcs/gmcs/ChangeLog,v
retrieving revision 1.56
diff -u -r1.56 ChangeLog
--- gmcs/ChangeLog	19 Dec 2003 21:37:24 -0000	1.56
+++ gmcs/ChangeLog	3 Jan 2004 10:05:27 -0000
@@ -1,3 +1,8 @@
+2004-01-03  David Sheldon <dave-mono at earth.li>
+
+  * expression.cs: Added matching ")" to error message for 
+  CS0077
+
 2003-12-19  Martin Baulig  <martin at ximian.com>
 
 	* typemanager.cs (TypeManager.IsEqualGenericType): New public
Index: mbas/expression.cs
===================================================================
RCS file: /cvs/public/mcs/mbas/expression.cs,v
retrieving revision 1.39
diff -u -r1.39 expression.cs
--- mbas/expression.cs	10 Nov 2003 20:56:33 -0000	1.39
+++ mbas/expression.cs	3 Jan 2004 10:05:30 -0000
@@ -1130,7 +1130,7 @@
 
 			if (TypeManager.IsValueType (probe_type)){
 				Report.Error (77, loc, "The as operator should be used with a reference type only (" +
-					      TypeManager.MonoBASIC_Name (probe_type) + " is a value type");
+					      TypeManager.MonoBASIC_Name (probe_type) + " is a value type)");
 				return null;
 			
 			}
Index: mbas/ChangeLog
===================================================================
RCS file: /cvs/public/mcs/mbas/ChangeLog,v
retrieving revision 1.59
diff -u -r1.59 ChangeLog
--- mbas/ChangeLog	24 Dec 2003 05:23:27 -0000	1.59
+++ mbas/ChangeLog	3 Jan 2004 10:05:31 -0000
@@ -1,3 +1,8 @@
+2004-01-03  David Sheldon <dave-mono at earth.li>
+
+  * expression.cs: Added matching ")" to error message for 
+  CS0077
+
 2003/12/23  Rafael Teixeira <rafaelteixeirabr at hotmail.com>
 	* driver.cs : added stubs for options "/netcf /sdkpath:path"
 	* namespace.cs, decl.cs, rootcontext.cs : use hashtable to avoid duplicate importation of namespaces 
Index: mcs/expression.cs
===================================================================
RCS file: /cvs/public/mcs/mcs/expression.cs,v
retrieving revision 1.512
diff -u -r1.512 expression.cs
--- mcs/expression.cs	2 Jan 2004 23:24:10 -0000	1.512
+++ mcs/expression.cs	3 Jan 2004 10:05:34 -0000
@@ -1250,7 +1250,7 @@
 
 			if (TypeManager.IsValueType (probe_type)){
 				Report.Error (77, loc, "The as operator should be used with a reference type only (" +
-					      TypeManager.CSharpName (probe_type) + " is a value type");
+					      TypeManager.CSharpName (probe_type) + " is a value type)");
 				return null;
 			
 			}
Index: mcs/ChangeLog
===================================================================
RCS file: /cvs/public/mcs/mcs/ChangeLog,v
retrieving revision 1.1298
diff -u -r1.1298 ChangeLog
--- mcs/ChangeLog	2 Jan 2004 23:24:10 -0000	1.1298
+++ mcs/ChangeLog	3 Jan 2004 10:05:46 -0000
@@ -1,3 +1,8 @@
+2004-01-03  David Sheldon <dave-mono at earth.li>
+
+  * expression.cs: Added matching ")" to error message for 
+  CS0077
+
 2004-01-02  Ravi Pratap  <ravi at ximian.com>
 
 	* expression.cs (BetterConversion): Prefer int -> uint


More information about the Mono-devel-list mailing list