[NI] Don't process lambda until expected type will be fixed

This commit is contained in:
Mikhail Zarechenskiy
2017-08-22 14:35:23 +03:00
parent ff4f928420
commit f31c48017b
12 changed files with 157 additions and 39 deletions
@@ -0,0 +1,14 @@
class MyList<T>
operator fun <T> MyList<T>.plusAssign(element: T) {}
val listOfFunctions = MyList<(Int) -> Int>()
fun foo() {
listOfFunctions.plusAssign({ it -> it })
listOfFunctions += { it -> it }
}
fun box(): String {
return "OK"
}
@@ -0,0 +1,7 @@
fun test() = foo({ line: String -> line })
fun <T> foo(x: T): T = TODO()
fun box(): String {
return "OK"
}