skip all type parameters in recordType

We only did this for Container in the type switch, but not for Struct.
The added test case panics otherwise.
Just like in the previous case, we still don't need to recurse
into type parameters for fieldToStruct to be filled correctly.

Fixes #899
This commit is contained in:
Paul Scheduikat
2025-01-19 03:52:35 +01:00
committed by Daniel Martí
parent e6c0aeffe1
commit 97833204f8
2 changed files with 17 additions and 11 deletions
+6 -2
View File
@@ -24,7 +24,7 @@ type GenericVector[GenericParamT any] []GenericParamT
type GenericGraph[T any] struct {
Content T
Edges []GenericGraph[T]
Edges []GenericGraph[T]
}
type PredeclaredSignedInteger interface {
@@ -40,7 +40,7 @@ type StringableSignedInteger interface {
type CombineEmbeds interface {
string | int
interface { EmbeddedMethod() }
interface{ EmbeddedMethod() }
RegularMethod()
}
@@ -49,3 +49,7 @@ type Slice[T any] []T
func sliceOfPointer() Slice[*any] {
return []*any{}
}
type Map[K, V comparable] map[K]V
var _ = Map[string, struct{}]{}