default:
// LCHAN hidden_type_non_recv_chan
s2 := p.hidden_type_non_recv_chan()
- ss := typeChan(s2, Cboth)
+ ss := typChan(s2, Cboth)
return ss
case '(':
p.next()
s3 := p.hidden_type_recv_chan()
p.want(')')
- ss := typeChan(s3, Cboth)
+ ss := typChan(s3, Cboth)
return ss
case LCOMM:
// LCHAN hidden_type
p.next()
s3 := p.hidden_type()
- ss := typeChan(s3, Csend)
+ ss := typChan(s3, Csend)
return ss
}
p.want(LCHAN)
s3 := p.hidden_type()
- ss := typeChan(s3, Crecv)
+ ss := typChan(s3, Crecv)
return ss
}
return t
}
-// typeDDDArray returns a new [...]T array Type.
-func typeDDDArray(elem *Type) *Type {
+// typDDDArray returns a new [...]T array Type.
+func typDDDArray(elem *Type) *Type {
t := typ(TARRAY)
t.Type = elem
t.Bound = dddBound
return t
}
-// typeChan returns a new chan Type with direction dir.
-func typeChan(elem *Type, dir uint8) *Type {
+// typChan returns a new chan Type with direction dir.
+func typChan(elem *Type, dir uint8) *Type {
t := typ(TCHAN)
t.Type = elem
t.Chan = dir
if l == nil {
t = typSlice(r.Type)
} else if l.Op == ODDD {
- t = typeDDDArray(r.Type)
+ t = typDDDArray(r.Type)
if top&Ecomplit == 0 && n.Diag == 0 {
t.Broke = true
n.Diag = 1
n.Type = nil
return n
}
- t := typeChan(l.Type, uint8(n.Etype)) // TODO(marvin): Fix Node.EType type union.
+ t := typChan(l.Type, uint8(n.Etype)) // TODO(marvin): Fix Node.EType type union.
n.Op = OTYPE
n.Type = t
n.Left = nil