1// Copyright 2021 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// This file is used to generate an object file which 6// serves as test file for gcimporter_test.go. 7 8package generics 9 10type Any any 11 12var x any 13 14type T[A, B any] struct { 15 Left A 16 Right B 17} 18 19var X T[int, string] = T[int, string]{1, "hi"} 20 21func ToInt[P interface{ ~int }](p P) int { return int(p) } 22 23var IntID = ToInt[int] 24 25type G[C comparable] int 26 27func ImplicitFunc[T ~int]() {} 28 29type ImplicitType[T ~int] int 30