summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-08-21 11:17:00 -0700
committerOri Bernstein <ori@markovcorp.com>2017-08-21 11:17:00 -0700
commit6d31b85ba1113ff9752849a39684e1b40fffa50a (patch)
tree58c6ec616327a7f24414156493d06c5a19a8764f
parent48434f5600e0d0096226462e4fe1e55270e1eb0d (diff)
downloadmc-fixtraits.tar.gz
The indexes with should be numbers as well as intsfixtraits
-rw-r--r--parse/infer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 693d074..de5e5d5 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1638,7 +1638,9 @@ inferexpr(Node **np, Type *ret, int *sawret)
htput(seqbase, t, b);
unify(n, type(args[0]), t);
constrain(n, type(args[1]), traittab[Tcint]);
+ constrain(n, type(args[1]), traittab[Tcnum]);
constrain(n, type(args[2]), traittab[Tcint]);
+ constrain(n, type(args[2]), traittab[Tcnum]);
settype(n, mktyslice(n->loc, b));
break;