mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/gc: convert Type.Broke into a bool
Convert Type.Broke from a uint8 to a boolean This change passes go build -toolexec 'toolstash -cmp' -a std. Change-Id: I44e7548c71b00467e36576bdf62933c42555a21a Reviewed-on: https://go-review.googlesource.com/14307 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Håvard Haugen <havard.haugen@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
8712e1867b
commit
8937780c8a
7 changed files with 38 additions and 38 deletions
|
|
@ -426,7 +426,7 @@ func algtype1(t *Type, bad **Type) int {
|
|||
if bad != nil {
|
||||
*bad = nil
|
||||
}
|
||||
if t.Broke != 0 {
|
||||
if t.Broke {
|
||||
return AMEM
|
||||
}
|
||||
if t.Noalg != 0 {
|
||||
|
|
@ -1133,7 +1133,7 @@ func assignop(src *Type, dst *Type, why *string) int {
|
|||
}
|
||||
|
||||
// we'll have complained about this method anyway, suppress spurious messages.
|
||||
if have != nil && have.Sym == missing.Sym && (have.Type.Broke != 0 || missing.Type.Broke != 0) {
|
||||
if have != nil && have.Sym == missing.Sym && (have.Type.Broke || missing.Type.Broke) {
|
||||
return OCONVIFACE
|
||||
}
|
||||
|
||||
|
|
@ -1317,7 +1317,7 @@ func assignconv(n *Node, t *Type, context string) *Node {
|
|||
|
||||
// Convert node n for assignment to type t.
|
||||
func assignconvfn(n *Node, t *Type, context func() string) *Node {
|
||||
if n == nil || n.Type == nil || n.Type.Broke != 0 {
|
||||
if n == nil || n.Type == nil || n.Type.Broke {
|
||||
return n
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue