mirror of
https://github.com/golang/go
synced 2024-11-23 07:40:04 -07:00
ff17b7d0d4
Fixes: #53254 Change-Id: I3153d6ebb9f25957b09363f45c5cd4651ee84c2d Reviewed-on: https://go-review.googlesource.com/c/go/+/410655 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
20 lines
304 B
Go
20 lines
304 B
Go
// compile
|
|
|
|
// 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 main
|
|
|
|
type Interface[T any] interface {
|
|
}
|
|
|
|
func F[T any]() Interface[T] {
|
|
var i int
|
|
return i
|
|
}
|
|
|
|
func main() {
|
|
F[int]()
|
|
}
|