From: erg Date: Sat, 23 May 2009 15:39:22 +0000 (+0000) Subject: Emit more information on error in type checking X-Git-Tag: LAST_LIBGRAPH~32^2~2035 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12bd86463557897c920a20a80993157267b64929;p=graphviz Emit more information on error in type checking --- diff --git a/lib/expr/exparse.y b/lib/expr/exparse.y index a9cd392cc..e4ee3875e 100644 --- a/lib/expr/exparse.y +++ b/lib/expr/exparse.y @@ -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);