Skip to content

Commit f27a56b

Browse files
committed
add higher-level test
1 parent 1cf277d commit f27a56b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Compiler/test/inference.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,6 +2303,12 @@ let 𝕃ᵢ = InferenceLattice(MustAliasesLattice(BaseInferenceLattice.instance)
23032303
@test ifelse_tfunc(MustAlias(2, AliasableField{Any}, 1, Int), Int, Int) === Union{}
23042304
end
23052305

2306+
@testset "issue #56913: `BoundsError` in type inference" begin
2307+
R = UnitRange{Int}
2308+
@test Type{AbstractVector} == Base.infer_return_type(Base.promote_typeof, Tuple{R, R, Vector{Any}, Vararg{R}})
2309+
@test Type{AbstractVector} == Base.infer_return_type(Base.promote_typeof, Tuple{R, R, Vector{Any}, R, Vararg{R}})
2310+
end
2311+
23062312
maybeget_mustalias_tmerge(x::AliasableField) = x.f
23072313
maybeget_mustalias_tmerge(x) = x
23082314
@test Base.return_types((Union{Nothing,AliasableField{Any}},); interp=MustAliasInterpreter()) do x

0 commit comments

Comments
 (0)