Name conflict between Service and Deployment or Pod?

The Kubernetes documentation states that names must be unique within a given object type.

In a new yaml, I set the == and got the following error upon apply:

The Service "somename" is invalid: spec.clusterIPs[0]: Invalid value: []string(nil): primary clusterIP can not be unset

Simply changing the name of the Service avoided the error.

Is that expected behavior?