Solving `type mismatch; found : X required: Y` Error in Scala
Working with a statically typed programming language like Scala can sometimes lead to a common compiler error message that might be tricky to understand if you’re new to the language or haven’t encountered it before. This is the `type mismatch; found : X required: Y` error which, as its name suggests, occurs when a value of type X is provided where a value of type Y is expected by the Scala language compiler.