aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/escape_iface_nounified.go25
-rw-r--r--test/escape_iface_unified.go2
-rw-r--r--test/fixedbugs/issue46903.go5
-rw-r--r--test/fixedbugs/issue53439.go1
-rw-r--r--test/inline_nounified.go21
-rw-r--r--test/inline_unified.go2
-rw-r--r--test/run.go28
7 files changed, 1 insertions, 83 deletions
diff --git a/test/escape_iface_nounified.go b/test/escape_iface_nounified.go
deleted file mode 100644
index 1d267bcd18..0000000000
--- a/test/escape_iface_nounified.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// errorcheck -0 -m -l
-//go:build !goexperiment.unified
-// +build !goexperiment.unified
-
-// 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 escape
-
-var sink interface{}
-
-func dotTypeEscape2() { // #13805, #15796
- {
- i := 0
- j := 0
- var ok bool
- var x interface{} = i // ERROR "i does not escape"
- var y interface{} = j // ERROR "j does not escape"
-
- sink = x.(int) // ERROR "x.\(int\) escapes to heap"
- // BAD: should be "y.\(int\) escapes to heap" too
- sink, *(&ok) = y.(int)
- }
-}
diff --git a/test/escape_iface_unified.go b/test/escape_iface_unified.go
index 80222dae5f..80dc80ca7b 100644
--- a/test/escape_iface_unified.go
+++ b/test/escape_iface_unified.go
@@ -1,6 +1,4 @@
// errorcheck -0 -m -l
-//go:build goexperiment.unified
-// +build goexperiment.unified
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue46903.go b/test/fixedbugs/issue46903.go
index 28cb43df3b..3a0b6049fd 100644
--- a/test/fixedbugs/issue46903.go
+++ b/test/fixedbugs/issue46903.go
@@ -1,8 +1,5 @@
// run
-//go:build goexperiment.unified && cgo
-
-// TODO(mdempsky): Enable test unconditionally. This test should pass
-// for non-unified mode too.
+//go:build cgo
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue53439.go b/test/fixedbugs/issue53439.go
index dc444b889a..f366a44183 100644
--- a/test/fixedbugs/issue53439.go
+++ b/test/fixedbugs/issue53439.go
@@ -1,5 +1,4 @@
// compile
-//go:build goexperiment.unified
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
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"
-}
diff --git a/test/inline_unified.go b/test/inline_unified.go
index 5dc43ab070..dad11827d7 100644
--- a/test/inline_unified.go
+++ b/test/inline_unified.go
@@ -1,6 +1,4 @@
// 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
diff --git a/test/run.go b/test/run.go
index 9a18f13672..8eff84d92d 100644
--- a/test/run.go
+++ b/test/run.go
@@ -76,15 +76,6 @@ var env = func() (res envVars) {
return
}()
-var unifiedEnabled = func() bool {
- for _, tag := range build.Default.ToolTags {
- if tag == "goexperiment.unified" {
- return true
- }
- }
- return false
-}()
-
// defaultAllCodeGen returns the default value of the -all_codegen
// flag. By default, we prefer to be fast (returning false), except on
// the linux-amd64 builder that's already very fast, so we get more
@@ -374,10 +365,6 @@ func (t *test) initExpectFail() {
failureSets = append(failureSets, types2Failures32Bit)
}
- if !unifiedEnabled {
- failureSets = append(failureSets, go118Failures)
- }
-
filename := strings.Replace(t.goFileName(), "\\", "/", -1) // goFileName() uses \ on Windows
for _, set := range failureSets {
@@ -2037,21 +2024,6 @@ var types2Failures32Bit = setOf(
"fixedbugs/issue23305.go", // large untyped int passed to println (32-bit)
)
-var go118Failures = setOf(
- "fixedbugs/issue54343.go", // 1.18 compiler assigns receiver parameter to global variable
- "fixedbugs/issue56280.go", // 1.18 compiler doesn't support inlining generic functions
- "typeparam/nested.go", // 1.18 compiler doesn't support function-local types with generics
- "typeparam/issue47631.go", // 1.18 can not handle local type declarations
- "typeparam/issue51521.go", // 1.18 compiler produces bad panic message and link error
- "typeparam/issue54456.go", // 1.18 compiler fails to distinguish local generic types
- "typeparam/issue54497.go", // 1.18 compiler is more conservative about inlining due to repeated issues
- "typeparam/issue55101.go", // 1.18 compiler ICEs writing export data
- "typeparam/mdempsky/16.go", // 1.18 compiler uses interface shape type in failed type assertions
- "typeparam/mdempsky/17.go", // 1.18 compiler mishandles implicit conversions from range loops
- "typeparam/mdempsky/18.go", // 1.18 compiler mishandles implicit conversions in select statements
- "typeparam/mdempsky/20.go", // 1.18 compiler crashes on method expressions promoted to derived types
-)
-
// In all of these cases, the 1.17 compiler reports reasonable errors, but either the
// 1.17 or 1.18 compiler report extra errors, so we can't match correctly on both. We
// now set the patterns to match correctly on all the 1.18 errors.