aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/gc/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/range.c')
-rw-r--r--src/cmd/gc/range.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/gc/range.c b/src/cmd/gc/range.c
index 14bb1be88c..f5f87b2165 100644
--- a/src/cmd/gc/range.c
+++ b/src/cmd/gc/range.c
@@ -89,12 +89,14 @@ typecheckrange(Node *n)
v1->type = t1;
else if(v1->type != T && assignop(t1, v1->type, &why) == 0)
yyerror("cannot assign type %T to %lN in range%s", t1, v1, why);
+ checkassign(v1);
}
if(v2) {
if(v2->defn == n)
v2->type = t2;
else if(v2->type != T && assignop(t2, v2->type, &why) == 0)
yyerror("cannot assign type %T to %lN in range%s", t2, v2, why);
+ checkassign(v2);
}
out: