-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bignumsBigInt and BigFloatBigInt and BigFloatregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release
Description
Passes on v1.11, throws MethodError
on v1.12:
using Test
struct Issue55899 end
const issue_55899_precision = Ref{Any}(123)
@testset "`setprecision` regression, issue #55899" begin
function Base.precision(::Type{Issue55899})
issue_55899_precision[]
end
function Base.setprecision(::Type{Issue55899}, p::Int)
issue_55899_precision[] = p
end
function issue_55899_get_set_precision(p::Int)
f = () -> precision(Issue55899)
setprecision(f, Issue55899, p)
end
for p ∈ (1, 10, 100)
@test p === issue_55899_get_set_precision(p)
@test 123 === precision(Issue55899)
end
end
xref #51362
Metadata
Metadata
Assignees
Labels
bignumsBigInt and BigFloatBigInt and BigFloatregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release