summaryrefslogtreecommitdiff
path: root/src/cmd/gc/range.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-15 12:57:09 -0800
committerRuss Cox <rsc@golang.org>2009-11-15 12:57:09 -0800
commit7b1e1f5210264d7a6fcfca501ad5d95c3c46471c (patch)
tree4df91b85cdb8c5bfe3bb1ac5be58df0e5ecd375d /src/cmd/gc/range.c
parent6f0382d8bbc2c333352d701afaaf94b916933fca (diff)
downloadgo-7b1e1f5210264d7a6fcfca501ad5d95c3c46471c.tar.gz
gc: five bug fixes, one better error.
* check for struct literal assignment to private fields. * record, fix crash involving parallel map assignment. * avoid infinite recursion in exportassignok. * make floating point bounds check precise. * avoid crash on invalid receiver. * add context to error about implicit assignment. Fixes issue 86. Fixes issue 88. Fixes issue 158. Fixes issue 174. Fixes issue 201. Fixes issue 204. R=ken2 http://codereview.appspot.com/154144
Diffstat (limited to 'src/cmd/gc/range.c')
-rw-r--r--src/cmd/gc/range.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/gc/range.c b/src/cmd/gc/range.c
index 393dd6426..758cd4f29 100644
--- a/src/cmd/gc/range.c
+++ b/src/cmd/gc/range.c
@@ -66,12 +66,12 @@ typecheckrange(Node *n)
if(v1->defn == n)
v1->type = t1;
- else if(v1->type != T && checkconv(t1, v1->type, 0, &op, &et) < 0)
+ else if(v1->type != T && checkconv(t1, v1->type, 0, &op, &et, "range") < 0)
yyerror("cannot assign type %T to %+N", t1, v1);
if(v2) {
if(v2->defn == n)
v2->type = t2;
- else if(v2->type != T && checkconv(t2, v2->type, 0, &op, &et) < 0)
+ else if(v2->type != T && checkconv(t2, v2->type, 0, &op, &et, "range") < 0)
yyerror("cannot assign type %T to %+N", t1, v1);
}