Author: manjula
Date: 2005-07-07 03:06:04 -0400 (Thu, 07 Jul 2005)
New Revision: 47026

Modified:
   trunk/mcs/mbas/ChangeLog
   trunk/mcs/mbas/mb-parser.jay
Log:
To avoid Array modifiers specified on both a variable and its type



Modified: trunk/mcs/mbas/ChangeLog
===================================================================
--- trunk/mcs/mbas/ChangeLog    2005-07-07 05:39:38 UTC (rev 47025)
+++ trunk/mcs/mbas/ChangeLog    2005-07-07 07:06:04 UTC (rev 47026)
@@ -1,3 +1,6 @@
+2005-07-07 Manjula GHM <[EMAIL PROTECTED]>
+       * mb-parser.jay: To avoid Array modifiers specified on both a variable 
and its type
+
 2005-07-06 Umadevi S <[EMAIL PROTECTED]>
        * statement.cs - suppressing warnings due to unused variables in mbas 
compiler.
 

Modified: trunk/mcs/mbas/mb-parser.jay
===================================================================
--- trunk/mcs/mbas/mb-parser.jay        2005-07-07 05:39:38 UTC (rev 47025)
+++ trunk/mcs/mbas/mb-parser.jay        2005-07-07 07:06:04 UTC (rev 47026)
@@ -3891,6 +3891,7 @@
                ArrayList VarDeclarations = new ArrayList();
                Expression vartype;
                ArrayList a_dims = null;
+               Expression exp;
 
                if ((names.Count > 1) && (varinit != null)) 
                        Report.Error (
@@ -3905,7 +3906,15 @@
                        current_rank_specifiers = (ArrayList) vname.Rank;
                        a_dims = null;
                        varinit = $4;
+                       exp = (Expression)$3;
 
+
+                       if (VariableDeclaration.IsArrayDecl (this) &&  (exp is 
MemberAccess))
+                                Report.Error (
+                                        31087, (Location)$1,
+                                        "Array modifiers can not specified on 
both a variable and its type" );
+
+
                        if(vname.Type != null && $3 != null)
                                Report.Error (
                                        30302, (Location)$1, 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to