You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backported PRs:
- [x] #50832 <!-- Subtype: bug fix for bounds with deeper covariant var
-->
- [x] #51782 <!-- Fix remove-addrspaces pass in the presence of globals
with addrspaces -->
- [x] #55720 <!-- Fix `pkgdir` for extensions -->
- [x] #55773 <!-- Add compat entry for `Base.donotdelete` -->
- [x] #55886 <!-- irrationals: restrict assume effects annotations to
known types -->
- [x] #55867 <!-- update `hash` doc string: `widen` not required any
more -->
- [x] #56148 <!-- Make loading work when stdlib deps are missing in the
manifest -->
- [x] #55870 <!-- fix infinite recursion in `promote_type` for
`Irrational` -->
- [x] #56252 <!-- REPL: fix brace detection when ' is used for transpose
-->
- [x] #56264 <!-- inference: fix inference error from constructing
invalid `TypeVar` -->
- [x] #56276 <!-- move time_imports and trace_* macros to Base but
remain owned by InteractiveUtils -->
- [x] #56254 <!-- REPL: don't complete str and cmd macros when the input
matches the internal name like `r_` to `r"` -->
- [x] #56280 <!-- Fix trampoline warning on x86 as well -->
- [x] #56304 <!-- typeintersect: more fastpath to skip intersect under
circular env -->
- [x] #56306 <!-- InteractiveUtils.jl: fixes issue where subtypes
resolves bindings and causes deprecation warnings -->
- [x] #42080 <!-- recommend explicit `using Foo: Foo, ...` in package
code (was: "using considered harmful") -->
- [x] #56441 <!-- Profile: mention `kill -s SIGUSR1 julia_pid` for Linux
-->
- [x] #56511 <!-- The `info` in LAPACK calls should be a Ref instead of
a Ptr -->
- [x] #55052 <!-- Fix `(l/r)mul!` with `Diagonal`/`Bidiagonal` -->
- [x] #52694 <!-- Reinstate similar for AbstractQ for backward
compatibility -->
Complex{T}(x::AbstractIrrational) where {T<:Real} =Complex{T}(T(x))
50
59
51
-
#XXX this may change `DEFAULT_PRECISION`, thus not effect free
52
-
@assume_effects:totalfunctionRational{T}(x::AbstractIrrational) where T<:Integer
60
+
function_irrational_to_rational(::Type{T}, x::AbstractIrrational) where T<:Integer
53
61
o =precision(BigFloat)
54
62
p =256
55
63
whiletrue
@@ -63,13 +71,16 @@ Complex{T}(x::AbstractIrrational) where {T<:Real} = Complex{T}(T(x))
63
71
p +=32
64
72
end
65
73
end
66
-
Rational{BigInt}(x::AbstractIrrational) =throw(ArgumentError("Cannot convert an AbstractIrrational to a Rational{BigInt}: use rationalize(BigInt, x) instead"))
74
+
Rational{T}(x::AbstractIrrational) where {T<:Integer} =_irrational_to_rational(T, x)
75
+
_throw_argument_error_irrational_to_rational_bigint() =throw(ArgumentError("Cannot convert an AbstractIrrational to a Rational{BigInt}: use rationalize(BigInt, x) instead"))
0 commit comments