Resolve ref types.