src/internal/types/testdata/fixedbugs/issue53692.go
raw| 1 | // Copyright 2023 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 | package p |
| 6 | |
| 7 | type Cache[K comparable, V any] interface{} |
| 8 | |
| 9 | type LRU[K comparable, V any] struct{} |
| 10 | |
| 11 | func WithLocking2[K comparable, V any](Cache[K, V]) {} |
| 12 | |
| 13 | func _() { |
| 14 | WithLocking2 /* ERROR "cannot infer V" */ [string](LRU[string, int]{}) |
| 15 | } |