-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Description
I also got the same error. MWE of the code I was working with:
package main
import "fmt"
type Interface[K any] interface {
Name() string
}
type interfaceImpl[K any] struct {
name string
}
func (i interfaceImpl[K]) Name() string {
return i.name
}
type Type[T any, K any] struct {
interfaceImpl[K]
}
func main() {
a := Type[int, int]{
interfaceImpl[int]{name: "hello"},
}
printName(a)
}
func printName[T any](k Type[T, int]) {
fmt.Println(k.Name())
}Originally posted by @arvidfm in #53254 (comment)
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.