]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: enable issue47631.go for Unified IR
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 30 Sep 2022 15:34:42 +0000 (22:34 +0700)
committerGopher Robot <gobot@golang.org>
Fri, 30 Sep 2022 23:00:20 +0000 (23:00 +0000)
Updates #53058

Change-Id: Ieaa500bea11f26f9a039196592bea67405bdf0ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/437215
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/go/internal/gcimporter/gcimporter_test.go
test/run.go
test/typeparam/issue47631.go

index 8c86bac54cd377ea8f13f765e31eb61783172fb0..275287d428a82acfac3f8457713edef4a9f37021 100644 (file)
@@ -179,6 +179,7 @@ func TestImportTypeparamTests(t *testing.T) {
                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",
                }
        }
index 5bd174e96760c37b74915a9b5c5eea145c96b472..34b9675d2eaac216665598a0f1eae10f10370d06 100644 (file)
@@ -1984,6 +1984,7 @@ var types2Failures32Bit = setOf(
 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
@@ -2021,8 +2022,6 @@ var _ = setOf(
 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 {
index c2ce951caccbcb63c4d08895727da641f48eac42..32fd837ddd3ff07a6ddea1d36c8b70dc314ba986 100644 (file)
@@ -1,34 +1,31 @@
-// 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
 }