Prepare array and slice tokens

This commit is contained in:
Nigel Tao committed 2018-04-05 21:51:38 +10:00
1 parent 97aab37462
commit 2b91e7861c
12 files changed
+81 -68

No files matched your search

+1 -1
View File
@@ -275,7 +275,7 @@ func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error {
return err
}
}
if n.XType().Decorator().Key() == t.KeyOpenBracket {
if n.XType().IsArrayType() {
if n.Value() != nil {
// TODO: something like:
// cv := n.XType().ArrayLength().ConstValue()