[NI] Add collecting forgotten type variables from callable references

#KT-35959 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-01-23 11:27:37 +03:00
parent be74e92c27
commit 14cf7a3d16
7 changed files with 55 additions and 1 deletions
@@ -0,0 +1,12 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// ISSUE: KT-35959
interface Expect<T>
inline val <T> Expect<T>.and: Expect<T> get() = this
infix fun <T> Expect<T>.and(assertionCreator: Expect<T>.() -> Unit): Expect<T> = this
fun <K> id(x: K): K = x
fun test(): Expect<Int>.(Expect<Int>.() -> Unit) -> Expect<Int> = id(Expect<Int>::and)