internal/lib/reflect: specialChannelAssignability

This commit is contained in:
visualfc
2024-12-14 10:05:26 +08:00
parent ec549a6a25
commit 46492009a1

View File

@@ -944,14 +944,11 @@ func implements(T, V *abi.Type) bool
// https://golang.org/doc/go_spec.html#Assignability
// T and V must be both of Chan kind.
func specialChannelAssignability(T, V *abi.Type) bool {
/*
// Special case:
// x is a bidirectional channel value, T is a channel type,
// x's type V and T have identical element types,
// and at least one of V or T is not a defined type.
return V.ChanDir() == abi.BothDir && (nameFor(T) == "" || nameFor(V) == "") && haveIdenticalType(T.Elem(), V.Elem(), true)
*/
panic("todo: reflect.specialChannelAssignability")
}
// directlyAssignable reports whether a value x of type V can be directly