Add test for typing
Corrected inference