From: Matthew Dempsky Date: Fri, 4 Jun 2021 06:52:34 +0000 (-0700) Subject: [dev.typeparams] runtime/race: make test compatible with types2 X-Git-Tag: go1.18beta1~1818^2^2~402 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4e001a8d9eec1ec165b45a37e804c2cf42351bc5;p=gostls13.git [dev.typeparams] runtime/race: make test compatible with types2 types2 correctly distinguishes variable assignment from use even within function literals. Whatever the outcome of #3059, the test cases in runtime/race need to be fixed to accomodate that. Change-Id: Ibe3547f07b681ff41225caabaf050872a48c98d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/325030 Trust: Matthew Dempsky Run-TryBot: Matthew Dempsky TryBot-Result: Go Bot Reviewed-by: Robert Griesemer --- diff --git a/src/runtime/race/output_test.go b/src/runtime/race/output_test.go index 99052071d0..63fcd847dc 100644 --- a/src/runtime/race/output_test.go +++ b/src/runtime/race/output_test.go @@ -148,7 +148,7 @@ exit status 66 package main func main() { done := make(chan bool) - x := 0 + x := 0; _ = x go func() { x = 42 done <- true @@ -162,7 +162,7 @@ func main() { package main func main() { done := make(chan bool) - x := 0 + x := 0; _ = x go func() { x = 42 done <- true @@ -178,7 +178,7 @@ func main() { package main func main() { done := make(chan bool) - x := 0 + x := 0; _ = x go func() { x = 42 done <- true