Type returns the type of the constant.
()
| 39 | |
| 40 | // Type returns the type of the constant. |
| 41 | func (c *Array) Type() types.Type { |
| 42 | // Cache type if not present. |
| 43 | if c.Typ == nil { |
| 44 | elemType := c.Elems[0].Type() |
| 45 | c.Typ = types.NewArray(uint64(len(c.Elems)), elemType) |
| 46 | } |
| 47 | return c.Typ |
| 48 | } |
| 49 | |
| 50 | // Ident returns the identifier associated with the constant. |
| 51 | func (c *Array) Ident() string { |