[hack] Treat values of heterogeneous arrays downcasted from AKshape as Tany if any of them was Tany
[hack] Treat values of heterogeneous arrays downcasted from AKshape as Tany if any of them was Tany

Summary: This is mirroring diffusion/FBCODE/browse/master/hphp/hack/src/typing/typing.ml;8008a8cf243001065f24d0fe5282d56008843d3e$924-934 logic, in the case when we went through AKshape first. See unit test for explanation.

I plan to disable the one in typing.ml too, but put it behind config setting - for people who are just doing the migration and might want to be less strict and aggressive, we want to keep it, and have it work even with AKshape.

Reviewed By: dlreeves

Differential Revision: D2588341

fb-gh-sync-id: 691bac28a6408ddc5785d4a2b07873762e356e92

gabro/flow,nmote/flow,OCamlPro/flow,AgentME/flow,TiddoLangerak/flow,jamesgpearce/flow,samwgoldman/flow,TiddoLangerak/flow,gabro/flow,graue/flow,AgentME/flow,claudiopro/flow,samwgoldman/flow,MichaelDeBoey/flow,OCamlPro/flow,d14b3l/flow,d14b3l/flow,popham/flow,shiftcars/flow,nmote/flow,jgrund/flow,jeffmo/flow,mroch/flow,mroch/flow,cesarandreu/flow,JonathanUsername/flow,jdelStrother/flow,mroch/flow,JonathanUsername/flow,AprilArcus/flow,jgrund/flow,AgentME/flow,jamesgpearce/flow,facebook/flow,ForbesLindesay/flow,gabelevi/flow,samwgoldman/flow,jamesgpearce/flow,ylu1317/flow,popham/flow,jdelStrother/flow,mroch/flow,jgrund/flow,gabelevi/flow,facebook/flow,jamesgpearce/flow,graue/flow,AprilArcus/flow,jamesgpearce/flow,d14b3l/flow,facebook/flow,nmote/flow,ForbesLindesay/flow,graue/flow,shiftcars/flow,jeffmo/flow,OCamlPro/flow,MichaelDeBoey/flow,claudiopro/flow,fletcherw/flow,chenglou/flow,fletcherw/flow,chenglou/flow,chenglou/flow,ylu1317/flow,cesarandreu/flow,AgentME/flow,gabro/flow,jeffmo/flow,claudiopro/flow,nmote/flow,ylu1317/flow,fletcherw/flow,facebook/flow,facebook/flow,MichaelDeBoey/flow,JonathanUsername/flow,d14b3l/flow,claudiopro/flow,chenglou/flow,popham/flow,JonathanUsername/flow,gabelevi/flow,popham/flow,ylu1317/flow,AprilArcus/flow,graue/flow,nmote/flow,fletcherw/flow,popham/flow,jamesgpearce/flow,jgrund/flow,nmote/flow,AprilArcus/flow,jeffmo/flow,gabro/flow,samwgoldman/flow,gabelevi/flow,chenglou/flow,AprilArcus/flow,MichaelDeBoey/flow,mroch/flow,facebook/flow,nmote/flow,jdelStrother/flow,shiftcars/flow,gabelevi/flow,ForbesLindesay/flow,graue/flow,MichaelDeBoey/flow,TiddoLangerak/flow,gabelevi/flow,d14b3l/flow,jeffmo/flow,samwgoldman/flow,jeffmo/flow,AgentME/flow,gabro/flow,samwgoldman/flow,facebook/flow,shiftcars/flow,shiftcars/flow,TiddoLangerak/flow,jdelStrother/flow,JonathanUsername/flow,graue/flow,fletcherw/flow,fletcherw/flow,samwgoldman/flow,ForbesLindesay/flow,d14b3l/flow,jdelStrother/flow,popham/flow,popham/flow,jgrund/flow,jdelStrother/flow,cesarandreu/flow,shiftcars/flow,mroch/flow,JonathanUsername/flow,claudiopro/flow,chenglou/flow,gabelevi/flow,jamesgpearce/flow,JonathanUsername/flow,jgrund/flow,ForbesLindesay/flow,OCamlPro/flow,gabro/flow,cesarandreu/flow,mroch/flow,ForbesLindesay/flow,TiddoLangerak/flow,ylu1317/flow,AprilArcus/flow