Static type and class inference