aboutsummaryrefslogtreecommitdiff
path: root/test/inline_nounified.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2022-12-01 16:14:11 -0800
committerMatthew Dempsky <mdempsky@google.com>2023-01-25 21:16:32 +0000
commit4f467f10820e78add23bf5ddeb1de521aa6f8864 (patch)
treebbbec653b076376952b8375e234117e0057ed592 /test/inline_nounified.go
parent3d49b683c6095a9a2681e84f05adfbb8d82882e8 (diff)
downloadgo-4f467f10820e78add23bf5ddeb1de521aa6f8864.tar.xz
cmd: remove GOEXPERIMENT=nounified knob
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>
Diffstat (limited to 'test/inline_nounified.go')
-rw-r--r--test/inline_nounified.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/test/inline_nounified.go b/test/inline_nounified.go
deleted file mode 100644
index 7a9fc10071..0000000000
--- a/test/inline_nounified.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// errorcheckwithauto -0 -m -d=inlfuncswithclosures=1
-//go:build !goexperiment.unified
-// +build !goexperiment.unified
-
-// 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 foo
-
-func r(z int) int {
- foo := func(x int) int { // ERROR "can inline r.func1" "func literal does not escape"
- return x + z
- }
- bar := func(x int) int { // ERROR "func literal does not escape" "can inline r.func2"
- return x + func(y int) int { // ERROR "can inline r.func2.1" "can inline r.func3"
- return 2*y + x*z
- }(x) // ERROR "inlining call to r.func2.1"
- }
- return foo(42) + bar(42) // ERROR "inlining call to r.func1" "inlining call to r.func2" "inlining call to r.func3"
-}