Added support for traits in compiler pass