Preserve types during empty container assignment (#58911)
authorAnsley Ussery <ansley@fb.com>
Fri, 10 Sep 2021 23:18:33 +0000 (16:18 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 10 Sep 2021 23:49:21 +0000 (16:49 -0700)
commitc60075d4b59ca6518c2181d3a97983e900d2a8b7
treee9b961bf21e908126aa01098ae03b0f6519922e9
parentb4855619d1c8aa65c0a81df96012709d771f4051
Preserve types during empty container assignment (#58911)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58911

Stack from [ghstack](https://github.com/ezyang/ghstack):
* __->__ #58911

Test Plan: Imported from OSS

Reviewed By: gmagogsfm

Differential Revision: D30785623

Pulled By: ansley

fbshipit-source-id: 4e05d6369318974290fea02ad2bc148293c25090
test/jit/test_list_dict.py
test/jit/test_typing.py
test/jit/test_union.py
test/test_jit.py
test/test_ops.py
torch/csrc/jit/frontend/ir_emitter.cpp
torch/csrc/jit/ir/alias_analysis.cpp
torch/testing/_internal/jit_utils.py