Commit c5bb50c9 authored by Ken Thompson's avatar Ken Thompson

assign nil to interface

SVN=123256
parent 7131bf47
......@@ -729,7 +729,7 @@ cgen_as(Node *nl, Node *nr, int op)
if(tl == T)
return;
if(nr == N) {
if(nr == N || isnil(nr)) {
if(isfat(tl)) {
/* clear a fat object */
if(debug['g'])
......
......@@ -43,9 +43,8 @@ loop:
if(n->op != ONAME)
dynlineno = n->lineno; // for diagnostics
if(debug['w'] > 1 && top == Etop)
if(n->op != OLIST)
dump("walk-before", n);
if(debug['w'] > 1 && top == Etop && n->op != OLIST)
dump("walk-before", n);
t = T;
et = Txxx;
......@@ -218,7 +217,6 @@ loop:
walktype(l, Elv);
walktype(r, Erv);
if(l == N || l->type == T)
goto ret;
......@@ -233,6 +231,7 @@ loop:
}
goto ret;
}
l = ascompatee(n->op, &n->left, &n->right);
if(l != N)
*n = *reorder3(l);
......@@ -662,8 +661,8 @@ badt:
goto ret;
ret:
if(debug['w'] && top == Etop)
dump("walk-after", n);
if(debug['w'] && top == Etop && n != N)
dump("walk", n);
ullmancalc(n);
dynlineno = lno;
......
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