mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
f29abccd8a
This issue has been fixed in https://golang.org/cl/345411 Fixes: #47892 Change-Id: I13dd3814650913da065e5f24a0c61d30adb0633a Reviewed-on: https://go-review.googlesource.com/c/go/+/345229 Reviewed-by: Dan Scales <danscales@google.com> Trust: Dan Scales <danscales@google.com> Trust: Keith Randall <khr@golang.org> Trust: Alberto Donizetti <alb.donizetti@gmail.com> Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
22 lines
390 B
Go
22 lines
390 B
Go
// 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 Model[T any] struct {
|
|
index a.Index[T]
|
|
}
|
|
|
|
func NewModel[T any](index a.Index[T]) Model[T] {
|
|
return Model[T]{
|
|
index: index,
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
_ = NewModel[int]((*a.I1[int])(nil))
|
|
}
|