1
0
mirror of https://github.com/golang/go synced 2024-11-26 11:38:01 -07:00

[dev.regabi] cmd/compile: remove typ from AssignOpStmt

Previous detached logic of typechecking AssignOpStmt from tcArith, the
typ field of it is not used anymore.

Pass toolstash -cmp.

Change-Id: I407507a1c4c4f2958fca4d6899875564e54bf1f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/279443
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Cuong Manh Le 2020-12-29 12:31:17 +07:00
parent e34c44a7c4
commit 82ad3083f8

View File

@ -112,7 +112,6 @@ func (n *AssignStmt) SetOp(op Op) {
// An AssignOpStmt is an AsOp= assignment statement: X AsOp= Y. // An AssignOpStmt is an AsOp= assignment statement: X AsOp= Y.
type AssignOpStmt struct { type AssignOpStmt struct {
miniStmt miniStmt
typ *types.Type
X Node X Node
AsOp Op // OADD etc AsOp Op // OADD etc
Y Node Y Node
@ -126,9 +125,6 @@ func NewAssignOpStmt(pos src.XPos, asOp Op, x, y Node) *AssignOpStmt {
return n return n
} }
func (n *AssignOpStmt) Type() *types.Type { return n.typ }
func (n *AssignOpStmt) SetType(x *types.Type) { n.typ = x }
// A BlockStmt is a block: { List }. // A BlockStmt is a block: { List }.
type BlockStmt struct { type BlockStmt struct {
miniStmt miniStmt