Are you maybe using an older version of scala? The first type mismatch comes from using a lambda to instantiate a “SAM” (Single Abstract Method) interface, which is only supported since Scala 2.12.
1 Like