summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2018-04-17 14:22:27 -0700
committerOri Bernstein <ori@markovcorp.com>2018-04-17 14:22:27 -0700
commit35b4358b60d0afdff7e4599a9e625c0fc1580288 (patch)
tree4c559121f8b137cb29e749f71cee92eddb884579
parentb433062cdda93b2eb1c4331a953d1ee5fbbd2bb4 (diff)
downloadmc-35b4358b60d0afdff7e4599a9e625c0fc1580288.tar.gz
Remove stray ',' from error message.
-rw-r--r--parse/infer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 2e99e40..02b3f90 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -981,10 +981,11 @@ verifytraits(Node *ctx, Type *a, Type *b)
n = 0;
*traitbuf = 0;
for (i = 0; bsiter(abs, &i); i++) {
- if (!bshas(bbs, i))
+ if (!bshas(bbs, i)) {
n += bprintf(traitbuf + n, sizeof(traitbuf) - n, "%s%s", sep,
- namestr(traittab[i]->name));
- sep = ",";
+ namestr(traittab[i]->name));
+ sep = ",";
+ }
}
tyfmt(abuf, sizeof abuf, a);
tyfmt(bbuf, sizeof bbuf, b);