package kamkor.contravariance.garbagecan

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

}
package kamkor.contravariance.garbagecan

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

}
--- 
+++ 
@@ -2,12 +2,12 @@
 
 object TrashModel {
   
-  class Item
+  trait Item
   
-  class PlasticItem extends Item
+  trait PlasticItem extends Item
   class PlasticBottle extends PlasticItem
   
-  class PaperItem extends Item
+  trait PaperItem extends Item
   class Newspaper extends PaperItem
 
 }
Change classes to traits in Trash Model
