Commit 524fb81c authored by Russ Cox's avatar Russ Cox

gc: inlining bug

R=lvd
CC=golang-dev
https://golang.org/cl/5533078
parent b1d6fa51
......@@ -669,8 +669,10 @@ typefmt(Fmt *fp, Type *t)
case 0:
break;
case 1:
fmtprint(fp, " %T", getoutargx(t)->type->type); // struct->field->field's type
break;
if(fmtmode != FExp) {
fmtprint(fp, " %T", getoutargx(t)->type->type); // struct->field->field's type
break;
}
default:
fmtprint(fp, " %T", getoutargx(t));
break;
......
......@@ -14,6 +14,9 @@ func F1(T *T) bool { return T == nil }
// Issue 2682.
func F2(c chan int) bool { return c == (<-chan int)(nil) }
// Use of single named return value.
func F3() (ret []int) { return append(ret, 1) }
// Call of inlined method with blank receiver.
func (_ *T) M() int { return 1 }
func (t *T) MM() int { return t.M() }
......@@ -12,9 +12,9 @@ import "./one"
func use() {
one.F1(nil)
one.F2(nil)
one.F3()
var t *one.T
t.M()
t.MM()
}
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