typecheck visibility