Oops -- dim can be empty.
authorRaja R Harinath <harinath@hurrynot.org>
Fri, 22 Sep 2006 12:25:25 +0000 (12:25 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Fri, 22 Sep 2006 12:25:25 +0000 (12:25 -0000)
svn path=/trunk/mcs/; revision=65813

mcs/mcs/expression.cs

index 12fda963568d34b16d4678fdf210d6634c2d38a2..3cfbdb7d8ca33c5e1fdf81d68f17532242ff823f 100644 (file)
@@ -8689,7 +8689,7 @@ namespace Mono.CSharp {
                        if (dim == "*" && !TypeManager.VerifyUnManaged (ltype, loc))
                                return null;
 
-                       if (dim [0] == '[' &&
+                       if (dim != "" && dim [0] == '[' &&
                            (ltype == TypeManager.arg_iterator_type || ltype == TypeManager.typed_reference_type)) {
                                Report.Error (611, loc, "Array elements cannot be of type `{0}'", TypeManager.CSharpName (ltype));
                                return null;