title: Contravariant method argument type
body: <p>wiki <a href="https://en.wikipedia.org/wiki/Covariance_and_contravariance_%28computer_science%29#Contravariant_method_argument_type" rel="nofollow">Contravariant_method_argument_type</a> says overriding method has the subtyping rule as function type, but no language except one support contravariant argument type. I also not able to come up with any idea of benefit to use that.</p>
  
  <p>example:</p>
  
  <pre><code>class AnimalShelter {
      Animal getAnimalForAdoption() {      ...        }         
      void putAnimal(Animal animal) {      ...        }   
  }
  
  class CatShelter extends AnimalShelter {
      ＠Overriding        
      Cat getAnimalForAdoption() {  return new Cat();    }        
      ＠Overriding                    
      void putAnimal(Object animal) {      …        }     
  }
  </code></pre>
  
  <p>My question is:</p>
  
  <ol>
  <li>Is contravariant argument type of overriding method any of good use? if yes, where it is?</li>
  <li>Is method a function? Why Scala has different rule for function type and overriding method type?</li>
  </ol>