mirror of
https://github.com/golang/go
synced 2024-11-22 04:34:39 -07:00
parent
b1d6fa517c
commit
524fb81c41
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user