@@ -97,7 +97,7 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
9797
9898 # Manually add the signature for the Caller constructor, since that was defined
9999 # outside of manual lowering
100- push! (signatures, nothing => Tuple{Type{Lowering. Caller}})
100+ push! (signatures, MethodInfoKey ( nothing , Tuple{Type{Lowering. Caller}}) )
101101
102102 nms = names (Lowering; all= true )
103103 modeval, modinclude = getfield (Lowering, :eval ), getfield (Lowering, :include )
@@ -107,7 +107,7 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
107107 isa (f, Base. Callable) || continue
108108 (f === modeval || f === modinclude) && continue
109109 for m in methods (f)
110- if (nothing => m. sig) ∉ signatures
110+ if MethodInfoKey (nothing , m. sig) ∉ signatures
111111 push! (failed, m. sig)
112112 end
113113 end
@@ -240,8 +240,8 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
240240 if ! LoweredCodeUtils. ismethod (stmt)
241241 pc = JuliaInterpreter. next_until! (LoweredCodeUtils. ismethod, frame, true )
242242 end
243- pc, pc3 = methoddef! (signatures, frame; define= false ) # this tests that the return isn't `nothing`
244- pc, pc3 = methoddef! (signatures, frame; define= false )
243+ pc, _ = methoddef! (signatures, frame; define= false ) # this tests that the return isn't `nothing`
244+ pc, _ = methoddef! (signatures, frame; define= false )
245245 @test length (signatures) == 2 # both the GeneratedFunctionStub and the main method
246246
247247 # With anonymous functions in signatures
@@ -307,13 +307,13 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
307307 frame = Frame (Lowering, ex)
308308 rename_framemethods! (frame)
309309 empty! (signatures)
310- pc, pc3 = methoddef! (signatures, frame; define= false )
310+ pc, _ = methoddef! (signatures, frame; define= false )
311311 @test pc < length (frame. framecode. src. code)
312312 kw2sig = Tuple{typeof (Lowering. keywrd2), Any}
313- @test kw2sig ∉ signatures
313+ @test MethodInfoKey ( nothing , kw2sig) ∉ signatures
314314 pc = methoddefs! (signatures, frame; define= false )
315315 @test pc === nothing
316- @test (nothing => kw2sig) ∈ signatures
316+ @test MethodInfoKey (nothing , kw2sig) ∈ signatures
317317
318318 # Module-scoping
319319 ex = :(Base. @irrational π 3.14159265358979323846 pi )
@@ -339,7 +339,7 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
339339 rename_framemethods! (frame)
340340 empty! (signatures)
341341 methoddefs! (signatures, frame; define= false )
342- @test (nothing => Tuple{typeof (Lowering. CustomMS)}) ∈ signatures
342+ @test MethodInfoKey (nothing , Tuple{typeof (Lowering. CustomMS)}) ∈ signatures
343343
344344 # https://github.com/timholy/Revise.jl/issues/398
345345 ex = quote
@@ -373,7 +373,7 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
373373 frame = Frame (Lowering422, ex)
374374 rename_framemethods! (frame)
375375 pc = methoddefs! (signatures, frame; define= false )
376- @test typeof (Lowering422. fneg) ∈ Set (Base. unwrap_unionall (sig). parameters[1 ] for (mt , sig) in signatures)
376+ @test typeof (Lowering422. fneg) ∈ Set (Base. unwrap_unionall (sig). parameters[1 ] for (_ , sig) in signatures)
377377
378378 # Scoped names (https://github.com/timholy/Revise.jl/issues/568)
379379 ex = :(f568 () = - 1 )
@@ -388,7 +388,7 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
388388 pc = JuliaInterpreter. step_expr! (frame, true )
389389 end
390390 pc = methoddef! (signatures, frame, pc; define= true )
391- @test (nothing => Tuple{typeof (Lowering. f568)}) ∈ signatures
391+ @test MethodInfoKey (nothing , Tuple{typeof (Lowering. f568)}) ∈ signatures
392392 @test Lowering. f568 () == - 2
393393
394394 # Undefined names
@@ -515,23 +515,23 @@ end
515515 ex = :(foo (x) = " foo" )
516516 Core. eval (ExternalMT, ex)
517517 frame = Frame (ExternalMT, ex)
518- pc = methoddefs! (signatures, frame; define = false )
518+ methoddefs! (signatures, frame; define = false )
519519 @test length (signatures) == 1
520520 (mt, sig) = pop! (signatures)
521521 @test (mt, sig) === (nothing , Tuple{typeof (ExternalMT. foo), Any})
522522
523523 ex = :(Base. Experimental. @overlay method_table foo (x) = " overlayed foo" )
524524 Core. eval (ExternalMT, ex)
525525 frame = Frame (ExternalMT, ex)
526- pc = methoddefs! (signatures, frame; define = false )
526+ methoddefs! (signatures, frame; define = false )
527527 @test length (signatures) == 1
528528 (mt, sig) = pop! (signatures)
529529 @test (mt, sig) === (ExternalMT. method_table, Tuple{typeof (ExternalMT. foo), Any})
530530
531531 ex = :(@overlay foo (x:: Int64 ) = " overlayed foo, second edition" )
532532 Core. eval (ExternalMT, ex)
533533 frame = Frame (ExternalMT, ex)
534- pc = methoddefs! (signatures, frame; define = false )
534+ methoddefs! (signatures, frame; define = false )
535535 @test length (signatures) == 1
536536 (mt, sig) = pop! (signatures)
537537 @test (mt, sig) === (ExternalMT. method_table, Tuple{typeof (ExternalMT. foo), Int64})
0 commit comments