object ForceSam : java.util.Comparator { override fun compare(o1: Runnable, o2: Runnable): Int = 0 } fun test(r: Runnable) { ForceSam.compare(r, r) ForceSam.compare({}, {}) ForceSam.compare(r, {}) ForceSam.compare({}, r) } // Check that new inference is enabled object Scope { interface A interface B class C fun foo(c: C) where K : A, K : B {} fun usage(c: C) { foo(c) // should compile only in NI } }