- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for CloningMap (0.1 sec)
-
test/typeparam/issue53087.go
M() } type S struct { str string } func (s *S) M() {} var _ I = &S{} type CloningMap[K comparable, V any] struct { inner map[K]V } func (cm CloningMap[K, V]) With(key K, value V) CloningMap[K, V] { result := CloneBad(cm.inner) result[key] = value return CloningMap[K, V]{result} } func CloneBad[M ~map[K]V, K comparable, V any](m M) M { r := make(M, len(m)) for k, v := range m {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 08 16:23:09 UTC 2023 - 930 bytes - Viewed (0)