]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: declare with type for fmtMode constant
authorTao Qingyun <qingyunha@gmail.com>
Mon, 2 Dec 2019 01:38:30 +0000 (09:38 +0800)
committerRobert Griesemer <gri@golang.org>
Mon, 2 Dec 2019 16:45:37 +0000 (16:45 +0000)
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>
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/main.go

index fd6b9ce53cc449782631a1be74cea17d82ca9fcf..95576b63955090965f7aff836daafab157c51e7f 100644 (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
 const (
-       FErr = iota
+       FErr fmtMode = iota
        FDbg
        FTypeId
        FTypeIdName // same as FTypeId, but use package name instead of prefix
index 4b6c8f2565615374fd60b59560230b86976dd861..8d7110b892430d014eefeccdba28ff0105646fad 100644 (file)
@@ -526,7 +526,7 @@ func Main(archInit func(*Arch)) {
        }
        types.FmtLeft = int(FmtLeft)
        types.FmtUnsigned = int(FmtUnsigned)
-       types.FErr = FErr
+       types.FErr = int(FErr)
        types.Ctxt = Ctxt
 
        initUniverse()