error: type mismatch - even though its the same class defined in notebook

error: type mismatch;

found :
Item(in class $iwC)(in class $iwC)(in class $iwC)(in class $iwC)

required:
Item(in class $iwC)(in class $iwC)(in class $iwC)(in class $iwC)

val jaccardSim = getJaccardSimilarity(itemPair._1, itemPair._2) ^

 

You're likely defining and using a case class in the same cell.

The workaround is to define the case class in a previous, separate cell - then reference it from a subsequent cell.

Have more questions? Submit a request

Comments