+ if (probe == null) {
+ error178 ();
+ return false;
+ }
+
+ if (value != probe.Count) {
+ error178 ();
+ return false;
+ }
+
+ if (probe [0] is ArrayList)
+ probe = (ArrayList) probe [0];
+ else {
+ for (int j = 0; j < probe.Count; ++j) {
+ Expression tmp = (Expression) probe [j];
+
+ tmp = tmp.Resolve (ec);
+
+ Expression conv = ConvertImplicitRequired (ec, tmp,
+ underlying_type, loc);
+
+ if (conv == null)
+ return false;
+ }
+
+ probe = null;
+ }
+ }
+
+ } else {
+ //
+ // Here is where we update dimension info in the case
+ // that the user skips doing that
+ //
+
+ Arguments = new ArrayList ();
+
+ for (probe = Initializers; probe != null; ) {
+ Expression e = new IntLiteral (probe.Count);
+
+ Arguments.Add (new Argument (e, Argument.AType.Expression));
+
+ if (probe [0] is ArrayList)
+ probe = (ArrayList) probe [0];
+ else {
+ for (int j = 0; j < probe.Count; ++j) {
+ Expression tmp = (Expression) probe [j];
+
+ tmp = tmp.Resolve (ec);
+
+ Expression conv = ConvertImplicitRequired (ec, tmp,
+ underlying_type, loc);
+
+ if (conv == null)
+ return false;
+ }
+
+ probe = null;
+ }
+ }
+
+ if (Arguments.Count != dimensions) {
+ error178 ();
+ return false;
+ }
+ }