cmd/compile: declare with type for fmtMode constant

Like FmtFlag constant in fmt.go

Change-Id: I351bcb27095549cf19db531f532ea72d5c682610
Reviewed-on: https://go-review.googlesource.com/c/go/+/209497
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Tao Qingyun 2019-12-02 09:38:30 +08:00 committed by Robert Griesemer
parent 3edd1d8d99
commit bf3ee57d27
2 changed files with 2 additions and 2 deletions

View file

@ -94,7 +94,7 @@ func fmtFlag(s fmt.State, verb rune) FmtFlag {
// *types.Sym, *types.Type, and *Node types use the flags below to set the format mode // *types.Sym, *types.Type, and *Node types use the flags below to set the format mode
const ( const (
FErr = iota FErr fmtMode = iota
FDbg FDbg
FTypeId FTypeId
FTypeIdName // same as FTypeId, but use package name instead of prefix FTypeIdName // same as FTypeId, but use package name instead of prefix

View file

@ -526,7 +526,7 @@ func Main(archInit func(*Arch)) {
} }
types.FmtLeft = int(FmtLeft) types.FmtLeft = int(FmtLeft)
types.FmtUnsigned = int(FmtUnsigned) types.FmtUnsigned = int(FmtUnsigned)
types.FErr = FErr types.FErr = int(FErr)
types.Ctxt = Ctxt types.Ctxt = Ctxt
initUniverse() initUniverse()