/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/typeparam/issue53762.go
18 строк
309 B
Robert Griesemer
go/types, types2: don't infer type argument for unused parameter in interfaces
26 май 2023, 00:37
26 май 2023, 00:37
1dd24d8
Код
Авторство
О чём код?
// 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 Value[T any] interface { } func use[T any](v Value[T]) { _, _ = v.(int) } func main() { use[int](Value[int](1)) }