Add the "const" keyword.

This commit is contained in:
Nigel Tao committed 2017-07-16 12:02:12 +10:00
1 parent 04a41987f0
commit b78807d60a
13 files changed
+292 -4

No files matched your search

+10
View File
@@ -438,6 +438,16 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
case t.KeyDot:
return q.tcheckDot(n, depth)
case t.KeyDollar:
for _, o := range n.Args() {
o := o.Expr()
if err := q.tcheckExpr(o, depth); err != nil {
return err
}
}
n.SetMType(typeExprList)
return nil
case t.KeyLimit:
lhs := n.LHS().Expr()
if err := q.tcheckExpr(lhs, depth); err != nil {