Skip to content

Commit a29b62f

Browse files
authored
Fix invalidations for show(::MethodInstance) and detect_ambiguities (#39253)
1 parent 069ba19 commit a29b62f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

base/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ function show_mi(io::IO, l::Core.MethodInstance, from_stackframe::Bool=false)
10041004
# to print a little more identifying information.
10051005
if !from_stackframe
10061006
linetable = l.uninferred.linetable
1007-
line = isempty(linetable) ? "unknown" : (lt = linetable[1]; string(lt.file) * ':' * string(lt.line))
1007+
line = isempty(linetable) ? "unknown" : (lt = linetable[1]::Union{LineNumberNode,Core.LineInfoNode}; string(lt.file) * ':' * string(lt.line))
10081008
print(io, " from ", def, " starting at ", line)
10091009
end
10101010
end

stdlib/Test/src/Test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ Use `recursive=true` to test in all submodules.
14591459
`Union{}` type parameters are included; in most cases you probably
14601460
want to set this to `false`. See [`Base.isambiguous`](@ref).
14611461
"""
1462-
function detect_ambiguities(mods...;
1462+
function detect_ambiguities(mods::Module...;
14631463
recursive::Bool = false,
14641464
ambiguous_bottom::Bool = false)
14651465
@nospecialize

0 commit comments

Comments
 (0)