]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/escape_reflect.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / escape_reflect.go
index b2d674a8a67a84a41a3237d56fa927b532c17bb5..99fbada9a98eb4641d151dc4059174f10173224b 100644 (file)
@@ -115,7 +115,7 @@ func is2(x [2]int) bool {
        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()
 }
@@ -352,9 +352,9 @@ func select2(ch chan string, x string) { // ERROR "leaking param: ch$" "leaking
 }
 
 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"
 )