]> granicus.if.org Git - graphviz/commitdiff
Emit more information on error in type checking
authorerg <devnull@localhost>
Sat, 23 May 2009 15:39:22 +0000 (15:39 +0000)
committererg <devnull@localhost>
Sat, 23 May 2009 15:39:22 +0000 (15:39 +0000)
lib/expr/exparse.y

index a9cd392cc4e52088269c09f6bbf7cf5b6d992a8f..e4ee3875e76b3e4039a9e77d38c6a3ddbb42eed4 100644 (file)
@@ -951,8 +951,8 @@ variable    :       ID members
               exerror("%s: is%s an array", $1->name, $1->local.pointer ? "" : " not");
                        if ($1->local.pointer && ($1->index_type > 0)) {
                                if ($2->type != $1->index_type)
-                       exerror("%s: indices must have type %s", 
-                                               $1->name, extypename(expr.program, $1->index_type));
+                       exerror("%s: indices must have type %s, not %s", 
+                                               $1->name, extypename(expr.program, $1->index_type),extypename(expr.program, $2->type));
                        }
                        if ($3) {
               n->data.variable.dyna =exnewnode(expr.program, 0, 0, 0, NiL, NiL);