Support scripting classmethod called with object instances (#49967)
Summary:
Currentlt classmethods are compiled the same way as methods - the first argument is self.
Adding a fake statement to assign the first argument to the class.
This is kind of hacky, but that's all it takes.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49967
Reviewed By: gchanan
Differential Revision: D25841378
Pulled By: ppwwyyxx
fbshipit-source-id: 0f3657b4c9d5d2181d658f9bade9bafc72de33d8