Make an ast.TypeExpr's ID0 field more consistent

This commit is contained in:
Nigel Tao committed 2018-04-20 16:21:16 +10:00
1 parent 90a794c0b8
commit 4ddc2f0055
5 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -983,7 +983,7 @@ func (q *checker) bcheckExprCall(n *a.Expr, depth uint32) error {
func makeSliceLengthExpr(slice *a.Expr) *a.Expr {
x := a.NewExpr(a.FlagsTypeChecked, t.IDDot, 0, t.IDLength, slice.Node(), nil, nil, nil)
x.SetMType(a.NewTypeExpr(t.IDOpenParen, 0, t.IDLength, slice.MType().Node(), nil, nil))
x.SetMType(a.NewTypeExpr(t.IDFunc, 0, t.IDLength, slice.MType().Node(), nil, nil))
x = a.NewExpr(a.FlagsTypeChecked, t.IDOpenParen, 0, 0, x.Node(), nil, nil, nil)
x.SetMType(typeExprU64)
return x
@@ -1182,7 +1182,7 @@ func (q *checker) bcheckTypeExpr(typ *a.TypeExpr) (*big.Int, *big.Int, error) {
}
switch typ.Decorator() {
// TODO: case t.IDOpenParen.
// TODO: case t.IDFunc.
case t.IDPtr, t.IDArray, t.IDSlice:
return nil, nil, nil
}