Skip to content

Commit

Permalink
avoid limiting Type{Any} to Type
Browse files Browse the repository at this point in the history
Fix #51510
  • Loading branch information
vtjnash committed Sep 29, 2023
1 parent b74daf5 commit 63ab716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/typelimits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ function _limit_type_size(@nospecialize(t), @nospecialize(c), sources::SimpleVec
ct = Union{}
end
Qt = __limit_type_size(tt, ct, sources, depth + 1, 0)
Qt === Any && return Type
Qt === tt && return t
Qt === Any && return Type
# Can't form Type{<:Qt} just yet, without first make sure we limited the depth
# enough, since this moves Qt outside of Type for is_derived_type_from_any
Qt = __limit_type_size(tt, ct, sources, depth + 2, 0)
Expand Down

0 comments on commit 63ab716

Please sign in to comment.