Type inference as traits