Skip to content

Commit

Permalink
fix invalidations from loading ArrayInterface.jl (#46673)
Browse files Browse the repository at this point in the history
* improve inferrability of `NamedTuple{names}(nt::NamedTuple) where {names}`
* improve inferrability of `recursive_dotcalls!(ex, args, i=1)`
  • Loading branch information
ranocha committed Sep 11, 2022
1 parent f7a8c02 commit 5d9807d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion base/namedtuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ function NamedTuple{names}(nt::NamedTuple) where {names}
types = Tuple{(fieldtype(nt, idx[n]) for n in 1:length(idx))...}
Expr(:new, :(NamedTuple{names, $types}), Any[ :(getfield(nt, $(idx[n]))) for n in 1:length(idx) ]...)
else
types = Tuple{(fieldtype(typeof(nt), names[n]) for n in 1:length(names))...}
length_names = length(names)::Integer
types = Tuple{(fieldtype(typeof(nt), names[n]) for n in 1:length_names)...}
NamedTuple{names, types}(map(Fix1(getfield, nt), names))
end
end
Expand Down
3 changes: 2 additions & 1 deletion stdlib/InteractiveUtils/src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function recursive_dotcalls!(ex, args, i=1)
end
end
(start, branches) = ex.head === :. ? (1, ex.args[2].args) : (2, ex.args)
for j in start:length(branches)
length_branches = length(branches)::Integer
for j in start:length_branches
branch, i = recursive_dotcalls!(branches[j], args, i)
branches[j] = branch
end
Expand Down

2 comments on commit 5d9807d

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

Please sign in to comment.