Ensure that all AST nodes are bounds checked

This commit is contained in:
Nigel Tao committed 2018-07-08 10:42:44 +10:00
1 parent 731ca8841b
commit ee95b548ab
4 files changed
+147 -64

No files matched your search

+5 -4
View File
@@ -773,10 +773,11 @@ func (n *TypeExpr) Unrefined() *TypeExpr {
if !n.IsRefined() {
return n
}
o := *n
o.lhs = nil
o.mhs = nil
return &o
return &TypeExpr{
kind: KTypeExpr,
id1: n.id1,
id2: n.id2,
}
}
func NewTypeExpr(decorator t.ID, pkg t.ID, name t.ID, alenRecvMin *Node, max *Expr, inner *TypeExpr) *TypeExpr {