-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only check inference on more recent versions of Julia
- Loading branch information
1 parent
0a1e13d
commit 5919b62
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,17 @@ using Test | |
include("utils.jl") | ||
|
||
function check_rmath(fname, statsfun, rmathfun, params, aname, a, isprob, rtol) | ||
v = @inferred(statsfun(params..., a)) | ||
rv = @inferred(rmathfun(params..., a)) | ||
# [email protected] made some changes that trips inference | ||
# on older versions of Julia. Not worth the the time trying to debug/fix | ||
# as we might drop support for these version soon so just putting the | ||
# inference check behind a VERSION branch | ||
if VERSION >= v"1.7" | ||
v = @inferred(statsfun(params..., a)) | ||
rv = @inferred(rmathfun(params..., a)) | ||
else | ||
v = statsfun(params..., a) | ||
rv = rmathfun(params..., a) | ||
end | ||
@test v isa float(Base.promote_typeof(params..., a)) | ||
@test rv isa float(Base.promote_typeof(params..., a)) | ||
if isprob | ||
|