internal/lib/reflect: specialChannelAssignability
This commit is contained in:
@@ -944,14 +944,11 @@ func implements(T, V *abi.Type) bool
|
|||||||
// https://golang.org/doc/go_spec.html#Assignability
|
// https://golang.org/doc/go_spec.html#Assignability
|
||||||
// T and V must be both of Chan kind.
|
// T and V must be both of Chan kind.
|
||||||
func specialChannelAssignability(T, V *abi.Type) bool {
|
func specialChannelAssignability(T, V *abi.Type) bool {
|
||||||
/*
|
// Special case:
|
||||||
// Special case:
|
// x is a bidirectional channel value, T is a channel type,
|
||||||
// x is a bidirectional channel value, T is a channel type,
|
// x's type V and T have identical element types,
|
||||||
// x's type V and T have identical element types,
|
// and at least one of V or T is not a defined type.
|
||||||
// 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)
|
||||||
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
|
// directlyAssignable reports whether a value x of type V can be directly
|
||||||
|
|||||||
Reference in New Issue
Block a user