package kamkor.contravariance.garbagecan

object TrashModel {
  
  class Item
  
  class PlasticItem extends Item
  class PlasticBottle extends PlasticItem
  
  class PaperItem extends Item
  class Newspaper extends PaperItem

}
package kamkor.contravariance.garbagecan

object TrashModel {
  
  trait Item
  
  trait PlasticItem extends Item
  class PlasticBottle extends PlasticItem
  
  trait PaperItem extends Item
  class Newspaper extends PaperItem

}
Change classes to traits in Trash Model
Change classes to traits in Trash Model
