We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae2dc16 commit 61defc0Copy full SHA for 61defc0
go/types/typeutil/typeparams.go
@@ -52,6 +52,10 @@ func (ts TypeSet) CoreType() types.Type {
52
// typ is currently a bidirectional channel. The term's type is either also bidirectional, or
53
// unidirectional. Use the term's type.
54
typ = ut
55
+ } else if ch2.Dir() == types.SendRecv {
56
+ // typ is currently a unidirectional channel and the term's type is bidirectional, which means it has no
57
+ // effect.
58
+ continue
59
} else if ch1.Dir() != ch2.Dir() {
60
// typ is not bidirectional and typ and term disagree about the direction
61
return nil
0 commit comments