Skip to content

Commit 8e140be

Browse files
authored
Merge pull request #7 from Keno/kf/latestworld
Adjust to upcoming world age change in Julia 1.12
2 parents dd88a53 + 7200046 commit 8e140be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/constinferred.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ testing type stability of a new function, where all arguments or keyword argumen
4141
the original function `f` that have a constant value (in the call expression) of type
4242
`Union{Number,Char,Symbol}` are hard coded.
4343
44-
If you want to test for constant propagation in a variable which is not hard-coded in
44+
If you want to test for constant propagation in a variable which is not hard-coded in
4545
the call expression, you can interpolate it into the expression.
4646
4747
Secondly, @constinferred returns the value if type inference succeeds, like `@inferred`,
@@ -175,9 +175,11 @@ function _constinferred(ex, mod, src, test_f, allow=:(Union{}))
175175
end
176176
$result
177177
end
178+
latestworld = isdefined(Core, :var"@latestworld") ? :(@Core.latestworld) : nothing
178179
finalex = Base.remove_linenums!(quote
179180
$pre
180181
Core.eval($mod, $fundefex)
182+
$latestworld
181183
let
182184
$main
183185
$post

0 commit comments

Comments
 (0)