Unify ClassType, InterfaceType and InterfaceOrClassType types into RefType.
Add typing rule for void type.