Skip to content

Commit 7ccda0e

Browse files
JeffBezansonKristofferC
authored andcommitted
fix bug in t-function for >: (#35136)
(cherry picked from commit 2a5bb59)
1 parent 9dbe7e8 commit 7ccda0e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ function abstract_call_known(@nospecialize(f), fargs::Union{Nothing,Vector{Any}}
841841
elseif la == 3 && istopfunction(f, :(>:))
842842
# mark issupertype as a exact alias for issubtype
843843
# swap T1 and T2 arguments and call <:
844-
if length(fargs) == 3
844+
if fargs !== nothing && length(fargs) == 3
845845
fargs = Any[<:, fargs[3], fargs[2]]
846846
else
847847
fargs = nothing

test/compiler/inference.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,3 +2503,5 @@ function h34752()
25032503
a34752(g...)
25042504
end
25052505
@test h34752() === true
2506+
2507+
@test map(>:, [Int], [Int]) == [true]

0 commit comments

Comments
 (0)