Skip to content

Commit 06521f1

Browse files
rfourquetViralBShah
authored andcommitted
printf.jl: add missing import of GMP (#22104)
1 parent efca045 commit 06521f1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

base/printf.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22

33
module Printf
4-
using Base.Grisu
4+
using Base: Grisu, GMP
55
export @printf, @sprintf
66

77
### printf formatter generation ###

test/printf.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ for (fmt, val) in (("%i", "42"),
2525
("%f", "42.000000"),
2626
("%g", "42")),
2727
num in (UInt16(42), UInt32(42), UInt64(42), UInt128(42),
28-
Int16(42), Int32(42), Int64(42), Int128(42))
28+
Int16(42), Int32(42), Int64(42), Int128(42), big"42")
2929
#big"42" causes stack overflow on %a ; gh #14409
30+
num isa BigInt && fmt in ["%a", "%#o", "%g"] && continue
3031
@test @eval(@sprintf($fmt, $num) == $val)
3132
end
3233

0 commit comments

Comments
 (0)