mirror of
https://github.com/golang/go
synced 2024-11-07 15:06:16 -07:00
4f467f1082
This CL removes the GOEXPERIMENT=nounified knob, and any conditional statements that depend on that knob. Further CLs to remove unreachable code follow this one. Updates #57410. Change-Id: I39c147e1a83601c73f8316a001705778fee64a91 Reviewed-on: https://go-review.googlesource.com/c/go/+/458615 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
20 lines
325 B
Go
20 lines
325 B
Go
// compile
|
|
|
|
// Copyright 2022 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
|
|
|
|
import "unsafe"
|
|
|
|
func F[T int](v T) uintptr {
|
|
return unsafe.Offsetof(struct{ f T }{
|
|
func(T) T { return v }(v),
|
|
}.f)
|
|
}
|
|
|
|
func f() {
|
|
F(1)
|
|
}
|