The line
private val keyComparator = util.Comparator.comparing[(String, String), String]((p: (String, String)) => p._1)
produces the error
[error] ...: overloaded method value comparing with alternatives:
[error] (x$1: java.util.function.Function[_ >: (String, String), _ <: String])java.util.Comparator[(String, String)] <and>
[error] (x$1: java.util.function.Function[_ >: (String, String), _ <: String],x$2: java.util.Comparator[_ >: String])java.util.Comparator[(String, String)]
[error] cannot be applied to (((String, String)) => String)
[error] private val keyComparator = util.Comparator.comparing[(String, String), String]((p: (String, String)) => p._1)
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 0 s, completed Jul 30, 2018 12:05:01 PM
If I try to simplify
private val keyComparator = util.Comparator.comparing[(String, String), String](_._1)
I have another error
[error] /home/shu/workspace/kookaburra/src/main/scala/rakuten/kookaburra/util/GrpQuery.scala:41: missing parameter type for expanded function ((x$5: <error>) => x$5._1)
[error] private val keyComparator = util.Comparator.comparing[(String, String), String](_._1)
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 1 s, completed Jul 30, 2018 12:24:53 PM
What am I doing wrong? Scala 2.12.6. For me it seems like a compiler bug.