Skip to content

Commit 44486d4

Browse files
authored
Merge pull request #189 from JuliaLabs/vc/world_age
Use current world_age instead of max
2 parents 52aaf98 + 98f1e52 commit 44486d4

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- '1.3'
2222
- '1.4'
2323
- '1.5'
24+
- '1.6'
2425
os:
2526
- ubuntu-latest
2627
- macOS-latest

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Cassette"
22
uuid = "7057c7e9-c182-5462-911a-8362d720325c"
3-
version = "0.3.5"
3+
version = "0.3.6"
44

55
[compat]
66
julia = "1"

src/overdub.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ function verbose_lineinfo!(ci::CodeInfo, @nospecialize(sig::Type{<:Tuple}))
7373
return ci
7474
end
7575

76+
if VERSION >= v"1.2"
77+
get_world_counter() = Base.get_world_counter()
78+
else
79+
get_world_counter() = typemax(UInt64)
80+
end
81+
7682
# Return `Reflection` for signature `sigtypes` and `world`, if possible. Otherwise, return `nothing`.
77-
function reflect(@nospecialize(sigtypes::Tuple), world::UInt = typemax(UInt))
83+
function reflect(@nospecialize(sigtypes::Tuple), world::UInt = get_world_counter())
7884
if length(sigtypes) > 2 && sigtypes[1] === typeof(invoke)
7985
@assert sigtypes[3] <: Type{<:Tuple}
8086
sigtypes = (sigtypes[2], sigtypes[3].parameters[1].parameters...)

0 commit comments

Comments
 (0)