mirror of
https://github.com/golang/go
synced 2024-11-26 16:46:58 -07:00
a95f1b51be
We use "build" for tests in the main package with a main function. We use "compile" for tests that are not in the main package. Change-Id: I9876b55a9e4672277483fd24e69058d439c66658 Reviewed-on: https://go-review.googlesource.com/c/go/+/334329 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
18 lines
280 B
Go
18 lines
280 B
Go
// compile
|
|
|
|
// Copyright 2015 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 bar() {
|
|
f := func() {}
|
|
foo(&f)
|
|
}
|
|
|
|
//go:noinline
|
|
func foo(f *func()) func() {
|
|
return *f
|
|
}
|