1
0
mirror of https://github.com/golang/go synced 2024-11-22 14:15:05 -07:00

2 minor bugs.

lv context for some [] operations
calling implicit(*map) before walk.

R=r
OCL=27706
CL=27706
This commit is contained in:
Ken Thompson 2009-04-21 19:52:13 -07:00
parent c18db5aa18
commit 190a540892

View File

@ -465,8 +465,8 @@ loop:
case OINDEX:
if(cl == 2 && cr == 1) {
// a,b = map[] - mapaccess2
implicitstar(&r->left);
walktype(r->left, Erv);
implicitstar(&r->left);
if(!istype(r->left->type, TMAP))
break;
l = mapop(n, top);
@ -3228,8 +3228,8 @@ multi:
// if so, types are valuetype,bool
if(cl != 2)
goto badt;
walktype(nr->left, Erv);
implicitstar(&nr->left);
walktype(nr->left, Elv);
t = nr->left->type;
if(!istype(t, TMAP))
goto badt;