skip = map[string]string{
"equal.go": "inconsistent embedded sorting", // TODO(rfindley): investigate this.
"nested.go": "fails to compile", // TODO(rfindley): investigate this.
+ "issue47631.go": "can not handle local type declarations",
"issue55101.go": "fails to compile",
}
}
var go118Failures = setOf(
"fixedbugs/issue54343.go", // 1.18 compiler assigns receiver parameter to global variable
"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
var unifiedFailures = setOf(
"closure3.go", // unified IR numbers closures differently than -d=inlfuncswithclosures
"escape4.go", // unified IR can inline f5 and f6; test doesn't expect this
-
- "typeparam/issue47631.go", // unified IR can handle local type declarations
)
func setOf(keys ...string) map[string]bool {
-// errorcheck
+// compile
// Copyright 2021 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.
-// TODO: one day we will support internal type declarations, at which time this test will be removed.
-
package p
func g[T any]() {
- type U []T // ERROR "type declarations inside generic functions are not currently supported"
- type V []int // ERROR "type declarations inside generic functions are not currently supported"
+ type U []T
+ type V []int
}
type S[T any] struct {
}
func (s S[T]) m() {
- type U []T // ERROR "type declarations inside generic functions are not currently supported"
- type V []int // ERROR "type declarations inside generic functions are not currently supported"
+ type U []T
+ type V []int
}
-
func f() {
- type U []int // ok
+ type U []int
}
type X struct {
}
func (x X) m() {
- type U []int // ok
+ type U []int
}