Initial commit: Go 1.23 release state
This commit is contained in:
9
test/typeparam/issue48306.dir/a.go
Normal file
9
test/typeparam/issue48306.dir/a.go
Normal file
@@ -0,0 +1,9 @@
|
||||
// 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.
|
||||
|
||||
package a
|
||||
|
||||
type I[T any] interface {
|
||||
F() T
|
||||
}
|
||||
15
test/typeparam/issue48306.dir/main.go
Normal file
15
test/typeparam/issue48306.dir/main.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// 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.
|
||||
|
||||
package main
|
||||
|
||||
import "./a"
|
||||
|
||||
type S struct{}
|
||||
|
||||
func (*S) F() *S { return nil }
|
||||
|
||||
func main() {
|
||||
var _ a.I[*S] = &S{}
|
||||
}
|
||||
Reference in New Issue
Block a user