Author: raja
Date: 2005-02-28 07:12:20 -0500 (Mon, 28 Feb 2005)
New Revision: 41279
Added:
trunk/mcs/errors/cs0053-2.cs
Modified:
trunk/mcs/errors/ChangeLog
trunk/mcs/errors/gmcs-ignore-tests
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/report.cs
Log:
Fix #73052.
* mcs/report.cs (Report.SymbolRelatedToPreviousError): Handle
non-simple types (array, pointer, reference).
* errors/cs0053-2.cs: New test from #73052.
Modified: trunk/mcs/errors/ChangeLog
===================================================================
--- trunk/mcs/errors/ChangeLog 2005-02-28 11:25:12 UTC (rev 41278)
+++ trunk/mcs/errors/ChangeLog 2005-02-28 12:12:20 UTC (rev 41279)
@@ -1,3 +1,7 @@
+2005-02-28 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * cs0053-2.cs: New test from #73052.
+
2005-02-23 Raja R Harinath <[EMAIL PROTECTED]>
* cs0122-10.cs, CS0122-10-lib.cs: New tests based on #57851.
Added: trunk/mcs/errors/cs0053-2.cs
===================================================================
--- trunk/mcs/errors/cs0053-2.cs 2005-02-28 11:25:12 UTC (rev 41278)
+++ trunk/mcs/errors/cs0053-2.cs 2005-02-28 12:12:20 UTC (rev 41279)
@@ -0,0 +1,15 @@
+// cs0053: Inconsistent accessibility: property type `Blah[]' is less
accessible than property `A.B'
+// Line: 6
+
+public class A {
+
+ public Blah [] B {
+ get { return null; }
+ }
+
+ static void Main () {}
+}
+
+class Blah {
+
+}
Modified: trunk/mcs/errors/gmcs-ignore-tests
===================================================================
--- trunk/mcs/errors/gmcs-ignore-tests 2005-02-28 11:25:12 UTC (rev 41278)
+++ trunk/mcs/errors/gmcs-ignore-tests 2005-02-28 12:12:20 UTC (rev 41279)
@@ -1,5 +1,6 @@
# These cause ICEs or crashes, and aren't well handled
# by the *-expect-* mechanism
+cs0053-2.cs
cs0120-5.cs
cs0131-3.cs
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2005-02-28 11:25:12 UTC (rev 41278)
+++ trunk/mcs/mcs/ChangeLog 2005-02-28 12:12:20 UTC (rev 41279)
@@ -1,3 +1,9 @@
+2005-02-28 Raja R Harinath <[EMAIL PROTECTED]>
+
+ Fix #73052.
+ * report.cs (Report.SymbolRelatedToPreviousError): Handle
+ non-simple types (array, pointer, reference).
+
2005-02-28 Marek Safar <[EMAIL PROTECTED]>
* cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
Modified: trunk/mcs/mcs/report.cs
===================================================================
--- trunk/mcs/mcs/report.cs 2005-02-28 11:25:12 UTC (rev 41278)
+++ trunk/mcs/mcs/report.cs 2005-02-28 12:12:20 UTC (rev 41279)
@@ -15,6 +15,7 @@
using System.Collections.Specialized;
using System.Diagnostics;
using System.Reflection;
+using System.Reflection.Emit;
namespace Mono.CSharp {
@@ -309,11 +310,14 @@
static public void SymbolRelatedToPreviousError (Type type)
{
- DeclSpace temp_ds = TypeManager.LookupDeclSpace (type);
- if (temp_ds == null)
+ if (type is TypeBuilder) {
+ DeclSpace temp_ds = TypeManager.LookupDeclSpace
(type);
+ SymbolRelatedToPreviousError (temp_ds.Location,
TypeManager.CSharpName (type));
+ } else if (type.HasElementType) {
+ SymbolRelatedToPreviousError
(type.GetElementType ());
+ } else {
SymbolRelatedToPreviousError
(type.Assembly.Location, TypeManager.CSharpName (type));
- else
- SymbolRelatedToPreviousError (temp_ds.Location,
TypeManager.CSharpName (type));
+ }
}
static void SymbolRelatedToPreviousError (string loc, string
symbol)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches