1
0
mirror of https://github.com/golang/go synced 2024-07-03 00:40:45 +00:00
go/test/typeparam/issue53254.go
Wayne Zuo ff17b7d0d4 cmd/compile: don't use dictionary convert to shaped empty interface
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>
2022-06-22 22:14:02 +00:00

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]()
}