/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/typeparam/issue54537.go
22 строки
336 B
Matthew Dempsky
cmd/compile: fix "expression has untyped type" ICE in generic code
23 авг 2022, 21:13
23 авг 2022, 21:13
0a6e1fa
Код
Авторство
О чём код?
// run // 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 func main() { _ = F[bool] var x string _ = G(x == "foo") } func F[T ~bool](x string) { var _ T = x == "foo" } func G[T any](t T) *T { return &t }