return v.IsValid() || v.IsNil() || v.IsZero()
}
-func is3(x struct { a, b int }) bool {
+func is3(x struct{ a, b int }) bool {
v := reflect.ValueOf(x) // ERROR "x does not escape"
return v.IsValid() || v.IsNil() || v.IsZero()
}
}
var (
- intTyp = reflect.TypeOf(int(0)) // ERROR "int\(0\) does not escape"
+ intTyp = reflect.TypeOf(int(0)) // ERROR "0 does not escape"
uintTyp = reflect.TypeOf(uint(0)) // ERROR "uint\(0\) does not escape"
- stringTyp = reflect.TypeOf(string("")) // ERROR "string\(.*\) does not escape"
+ stringTyp = reflect.TypeOf(string("")) // ERROR ".. does not escape"
bytesTyp = reflect.TypeOf([]byte{}) // ERROR "\[\]byte{} does not escape"
)