Update lectures/08-generics/lecture.slide

This commit is contained in:
Fedor Korotkiy 2022-04-07 16:25:34 +00:00
parent a62fc07303
commit e6a1932822

View file

@ -329,14 +329,14 @@ Why don't we need explicit type parameters?
* Relationships between type parameters * Relationships between type parameters
type Pointer[T any] interface { type Pointer[T any] interface {
type *T *T
} }
func f[T any, PT Pointer[T]](x T) func f[T any, PT Pointer[T]](x T)
or with inlined constraint or with inlined constraint
func foo[T any, PT interface{type *T}](x T) func foo[T any, PT interface{*T}](x T)
* When to use generics * When to use generics