Commit e5636d6e authored by Russ Cox's avatar Russ Cox

avoid seg fault when return type is unknown

Fixes #80.

R=ken
https://golang.org/cl/154079
parent 8b957209
......@@ -1138,6 +1138,11 @@ Tpretty(Fmt *fp, Type *t)
break;
case 1:
t1 = getoutargx(t)->type;
if(t1 == T) {
// failure to typecheck earlier; don't know the type
fmtprint(fp, " ?unknown-type?");
break;
}
if(t1->etype != TFIELD && t1->etype != TFUNC) {
fmtprint(fp, " %T", t1);
break;
......
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