Skip to content

Commit

Permalink
Merge pull request #47336 from JuliaLang/jn/47246
Browse files Browse the repository at this point in the history
subtype: fix miscount of Tuple Vararg matching
  • Loading branch information
vchuravy authored Oct 27, 2022
2 parents 8ff3358 + 17515cd commit eca5512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/subtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ static int subtype_tuple_tail(jl_datatype_t *xd, jl_datatype_t *yd, int8_t R, jl
{
size_t lx = jl_nparams(xd);
size_t ly = jl_nparams(yd);
size_t i = 0, j = 0, vx = 0, vy = 0, x_reps = 1;
size_t i = 0, j = 0, vx = 0, vy = 0, x_reps = 0;
jl_value_t *lastx = NULL, *lasty = NULL;
jl_value_t *xi = NULL, *yi = NULL;

Expand Down
2 changes: 2 additions & 0 deletions test/subtype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2249,3 +2249,5 @@ T46784{B<:Val, M<:AbstractMatrix} = Tuple{<:Union{B, <:Val{<:B}}, M, Union{Abstr
# issue 21153
@test_broken (Tuple{T1,T1} where T1<:(Val{T2} where T2)) <: (Tuple{Val{S},Val{S}} where S)
end

@test !(Tuple{Any, Any, Any} <: Tuple{Any, Vararg{T}} where T)

0 comments on commit eca5512

Please sign in to comment.