Skip to content

Commit d8bd0bd

Browse files
committed
Don't accidentally override Base.sin(::Float64)
1 parent 118978a commit d8bd0bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/signatures.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,21 +510,21 @@ end
510510
Core.eval(ExternalMT, :(Base.Experimental.@MethodTable method_table))
511511
signatures = MethodInfoKey[]
512512

513-
ex = :(Base.sin(::Float64) = "sin")
513+
ex = :(foo(x) = "foo")
514514
Core.eval(ExternalMT, ex)
515515
frame = Frame(ExternalMT, ex)
516516
pc = methoddefs!(signatures, frame; define = false)
517517
@test length(signatures) == 1
518518
(mt, sig) = pop!(signatures)
519-
@test (mt, sig) === (nothing, Tuple{typeof(sin), Float64})
519+
@test (mt, sig) === (nothing, Tuple{typeof(ExternalMT.foo), Any})
520520

521-
ex = :(Base.Experimental.@overlay method_table sin(::Float64) = "sin")
521+
ex = :(Base.Experimental.@overlay method_table foo(x) = "overlayed foo")
522522
Core.eval(ExternalMT, ex)
523523
frame = Frame(ExternalMT, ex)
524524
pc = methoddefs!(signatures, frame; define = false)
525525
@test length(signatures) == 1
526526
(mt, sig) = pop!(signatures)
527-
@test (mt, sig) === (ExternalMT.method_table, Tuple{typeof(sin), Float64})
527+
@test (mt, sig) === (ExternalMT.method_table, Tuple{typeof(ExternalMT.foo), Any})
528528
end
529529

530530
end # module signatures

0 commit comments

Comments
 (0)