Skip to content

Commit 5679ae9

Browse files
committed
Add test for kwcall handling failure
1 parent 11b6884 commit 5679ae9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ isdefined(Main, :Revise) ? Main.Revise.includet("script.jl") : include("script.j
292292
src, line = definition(String, m)
293293
@test occursin("::Type{P}", src)
294294
@test line == 148
295+
296+
# Graceful handling of `kwcall` definition lookup failure
297+
m = @which Core.kwcall(NamedTuple(), Union{})
298+
@test_throws "could not identify method name in `Core.kwcall`" definition(String, m)
299+
@test_throws "signature: Tuple{typeof(Core.kwcall), Any, Type{Union{}}, Vararg{Any}}" definition(String, m)
295300
end
296301

297302
@testset "With Revise" begin

0 commit comments

Comments
 (0)