Commit 48e482ef authored by Cuong Manh Le's avatar Cuong Manh Le Committed by Matthew Dempsky

cmd/compile: do not mark export for send only chan

No changes in compilebench, pass toolstash-check.

Change-Id: I2688f7b45af0eaa0cf3b38e726bce6e68c20f69c
Reviewed-on: https://go-review.googlesource.com/c/go/+/195077
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent a9fdd6bb
......@@ -43,11 +43,14 @@ func (p *exporter) markType(t *types.Type) {
// the user already needs some way to construct values of
// those types.
switch t.Etype {
case TPTR, TARRAY, TSLICE, TCHAN:
// TODO(mdempsky): Skip marking element type for
// send-only channels?
case TPTR, TARRAY, TSLICE:
p.markType(t.Elem())
case TCHAN:
if t.ChanDir().CanRecv() {
p.markType(t.Elem())
}
case TMAP:
p.markType(t.Key())
p.markType(t.Elem())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment