Skip to content

Commit 47fd6fa

Browse files
KenoDrvi
authored andcommitted
inference: Guard TypeVar special case against vararg (JuliaLang#52721)
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.
1 parent c33ab76 commit 47fd6fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/compiler/inference.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5130,5 +5130,10 @@ let TV = TypeVar(:T)
51305130
@test abstract_call_unionall_vararg(some) isa UnionAll
51315131
end
51325132

5133+
# Issue #51927
5134+
let 𝕃 = Core.Compiler.fallback_lattice
5135+
@test apply_type_tfunc(𝕃, Const(Tuple{Vararg{Any,N}} where N), Int) == Type{NTuple{_A, Any}} where _A
5136+
end
5137+
51335138
# Issue #52613
51345139
@test (code_typed((Any,)) do x; TypeVar(x...); end)[1][2] === TypeVar

0 commit comments

Comments
 (0)