pytorch
fb451713 - Allow 'Any' to appear as a type argument. (#26572)

Commit
5 years ago
Allow 'Any' to appear as a type argument. (#26572) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/26572 Combined with isinstance specialization this allows a degree of polymorphic functions to work without needing to use our weirder overload hacks. We do not define any operators on Any, so the only thing you can do with it is to put it in containers or type refine it using an isinstance check. Any is restricted from appearing in non-argument position because we cannot restore type tags if it ends up as a field in a class. Test Plan: Imported from OSS Differential Revision: D17530643 Pulled By: zdevito fbshipit-source-id: f06f78ce84819f7773953a492f3d4c49219ee94c
Author
Parents
Loading