Skip to content

Commit bf3ee57

Browse files
qingyunhagriesemer
authored andcommitted
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
1 parent 3edd1d8 commit bf3ee57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cmd/compile/internal/gc/fmt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func fmtFlag(s fmt.State, verb rune) FmtFlag {
9494

9595
// *types.Sym, *types.Type, and *Node types use the flags below to set the format mode
9696
const (
97-
FErr = iota
97+
FErr fmtMode = iota
9898
FDbg
9999
FTypeId
100100
FTypeIdName // same as FTypeId, but use package name instead of prefix

src/cmd/compile/internal/gc/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ func Main(archInit func(*Arch)) {
526526
}
527527
types.FmtLeft = int(FmtLeft)
528528
types.FmtUnsigned = int(FmtUnsigned)
529-
types.FErr = FErr
529+
types.FErr = int(FErr)
530530
types.Ctxt = Ctxt
531531

532532
initUniverse()

0 commit comments

Comments
 (0)