Bootstrap: type inference and codegen for class methods