File tree 2 files changed +2
-1
lines changed
go/analysis/passes/printf
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -791,7 +791,7 @@ var printVerbs = []printVerb{
791
791
// '#' is alternate format for several verbs.
792
792
// ' ' is spacer for numbers
793
793
{'%' , noFlag , 0 },
794
- {'b' , numFlag , argInt | argFloat | argComplex | argPointer },
794
+ {'b' , sharpNumFlag , argInt | argFloat | argComplex | argPointer },
795
795
{'c' , "-" , argRune | argInt },
796
796
{'d' , numFlag , argInt | argPointer },
797
797
{'e' , sharpNumFlag , argFloat | argComplex },
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ func PrintfTests() {
160
160
fmt .Printf ("%*% x" , 0.22 ) // want `Printf format %\*% uses non-int 0.22 as argument of \*`
161
161
fmt .Printf ("%q %q" , multi ()... ) // ok
162
162
fmt .Printf ("%#q" , `blah` ) // ok
163
+ fmt .Printf ("%#b" , 3 ) // ok
163
164
// printf("now is the time", "buddy") // no error "printf call has arguments but no formatting directives"
164
165
Printf ("now is the time" , "buddy" ) // want "Printf call has arguments but no formatting directives"
165
166
Printf ("hi" ) // ok
You can’t perform that action at this time.
0 commit comments