summaryrefslogtreecommitdiff
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/gc/range.c b/src/cmd/gc/range.c
index dfb2b8efd..fb33e4e48 100644
--- a/src/cmd/gc/range.c
+++ b/src/cmd/gc/range.c
@@ -98,11 +98,13 @@ walkrange(Node *n)
Node *fn, *tmp;
NodeList *body, *init;
Type *th, *t;
+ int lno;
t = n->type;
init = nil;
a = n->right;
+ lno = setlineno(a);
if(t->etype == TSTRING && !eqtype(t, types[TSTRING])) {
a = nod(OCONV, n->right, N);
a->type = types[TSTRING];
@@ -248,5 +250,7 @@ walkrange(Node *n)
typechecklist(body, Etop);
n->nbody = concat(body, n->nbody);
walkstmt(&n);
+
+ lineno = lno;
}