Skip to content

Commit

Permalink
Fix instance->methodinstance depwarn (#242)
Browse files Browse the repository at this point in the history
This was deprecated a while ago but I had never noticed.
  • Loading branch information
timholy authored Mar 4, 2021
1 parent d8feaa1 commit e511b9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/snoopr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ end

c = Any[1]
@test SnooprTests.callapplyf(c) == 1
mi1 = instance(SnooprTests.applyf, (Vector{Any},))
mi2 = instance(SnooprTests.callapplyf, (Vector{Any},))
mi1 = methodinstance(SnooprTests.applyf, (Vector{Any},))
mi2 = methodinstance(SnooprTests.callapplyf, (Vector{Any},))

invs = @snoopr SnooprTests.f(::AbstractFloat) = 3
@test !isempty(invs)
Expand Down Expand Up @@ -84,10 +84,10 @@ end

cf = Any[1.0f0]
@test SnooprTests.callapplyf(cf) == 3
mi1 = instance(SnooprTests.applyf, (Vector{Any},))
mi2 = instance(SnooprTests.callapplyf, (Vector{Any},))
mi1 = methodinstance(SnooprTests.applyf, (Vector{Any},))
mi2 = methodinstance(SnooprTests.callapplyf, (Vector{Any},))
@test mi1.backedges == [mi2]
mi3 = instance(SnooprTests.f, (AbstractFloat,))
mi3 = methodinstance(SnooprTests.f, (AbstractFloat,))
invs = @snoopr SnooprTests.f(::Float32) = 4
@test !isempty(invs)
trees = invalidation_trees(invs)
Expand Down

0 comments on commit e511b9a

Please sign in to comment.