Skip to content

Commit

Permalink
inference: Guard TypeVar special case against vararg (JuliaLang#52721)
Browse files Browse the repository at this point in the history
Fix JuliaLang#52613 by making the TypeVar special case in inference check for
vararg first. There's nothing the special case can really do with vararg
anyway, so fall back to the ordinary abstract call handling.
  • Loading branch information
Keno authored and Drvi committed Jun 7, 2024
1 parent c33ab76 commit 47fd6fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/compiler/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5130,5 +5130,10 @@ let TV = TypeVar(:T)
@test abstract_call_unionall_vararg(some) isa UnionAll
end

# Issue #51927
let 𝕃 = Core.Compiler.fallback_lattice
@test apply_type_tfunc(𝕃, Const(Tuple{Vararg{Any,N}} where N), Int) == Type{NTuple{_A, Any}} where _A
end

# Issue #52613
@test (code_typed((Any,)) do x; TypeVar(x...); end)[1][2] === TypeVar

0 comments on commit 47fd6fa

Please sign in to comment.