score:0

This looks to be a bug in IntelliJ. I was able to reproduce the issue and see the error in the editor, but there are no errors or warnings on compiling.

Because there's no definition of orderByCount given, I'm assuming it's something like:

val orderByCount = Ordering[Int].on[Foo](_.count)
new mutable.TreeSet[Foo]()(orderByCount) with mutable.SynchronizedSet[Foo]

UPDATE: Came up with a way to eliminate the error in IntelliJ by overriding ordering:

new mutable.TreeSet[Foo]()(orderByCount) with mutable.SynchronizedSet[Foo] {
    implicit override val ordering: Ordering[Foo] = orderByCount
}

Related Query

More Query from same tag