Add some tests for new type inference