A static type system for message passing