1
0
mirror of https://github.com/golang/go synced 2024-11-22 16:04:40 -07:00
go/test/fixedbugs/issue42686.go
Austin Clements d3ab6b5049 test: switch fieldtrack test to use GOEXPERIMENT
Now that we can set GOEXPERIMENT at build time, we no longer need
-d=fieldtrack in the compiler to enabled field tracking at build time.
Switch the one test that uses -d=fieldtrack to use GOEXPERIMENT
instead so we can eliminate this debug flag and centralize on
GOEXPERIMENT.

Updates #42681.

Change-Id: I14c352c9a97187b9c5ec8027ff672d685f22f543
Reviewed-on: https://go-review.googlesource.com/c/go/+/302969
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-03-18 21:27:21 +00:00

12 lines
281 B
Go

// compile -goexperiment fieldtrack
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package p
func a(x struct{ f int }) { _ = x.f }
func b() { a(struct{ f int }{}) }