Skip to content

Commit

Permalink
don't attempt const prop with constant Arrays (#35253)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored Mar 26, 2020
1 parent cc60547 commit f4c3f1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,15 @@ function abstract_call_method_with_const_args(@nospecialize(rettype), @nospecial
# don't propagate constant index into indexing of non-constant array
if arrty isa Type && arrty <: AbstractArray && !issingletontype(arrty)
return Any
elseif arrty Array
return Any
end
elseif istopfunction(f, :iterate)
itrty = argtypes[2]
if itrty isa Type && !issingletontype(itrty)
return Any
elseif itrty Array
return Any
end
end
end
Expand Down

0 comments on commit f4c3f1d

Please sign in to comment.