Commit 190a5408 authored by Ken Thompson's avatar Ken Thompson

2 minor bugs.

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

R=r
OCL=27706
CL=27706
parent c18db5aa
...@@ -465,8 +465,8 @@ loop: ...@@ -465,8 +465,8 @@ loop:
case OINDEX: case OINDEX:
if(cl == 2 && cr == 1) { if(cl == 2 && cr == 1) {
// a,b = map[] - mapaccess2 // a,b = map[] - mapaccess2
implicitstar(&r->left);
walktype(r->left, Erv); walktype(r->left, Erv);
implicitstar(&r->left);
if(!istype(r->left->type, TMAP)) if(!istype(r->left->type, TMAP))
break; break;
l = mapop(n, top); l = mapop(n, top);
...@@ -3228,8 +3228,8 @@ multi: ...@@ -3228,8 +3228,8 @@ multi:
// if so, types are valuetype,bool // if so, types are valuetype,bool
if(cl != 2) if(cl != 2)
goto badt; goto badt;
walktype(nr->left, Erv);
implicitstar(&nr->left); implicitstar(&nr->left);
walktype(nr->left, Elv);
t = nr->left->type; t = nr->left->type;
if(!istype(t, TMAP)) if(!istype(t, TMAP))
goto badt; goto badt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment