Redundant lambda arrow: do not report on type parameter

#KT-28131 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-01-24 15:29:13 +09:00
committed by Mikhail Glukhikh
parent 8fbf1ed683
commit 4ffeff5e6c
5 changed files with 49 additions and 0 deletions
@@ -0,0 +1,6 @@
// PROBLEM: none
fun <T> foo(t: T) {}
fun test() {
foo({ <caret>_: Boolean -> "" })
}
@@ -0,0 +1,8 @@
// PROBLEM: none
class Foo<T>(val t: T)
fun bar(foo: Foo<(Boolean) -> String>) {}
fun test() {
bar(Foo({ <caret>_ -> "" }))
}
@@ -0,0 +1,10 @@
// PROBLEM: none
// WITH_RUNTIME
fun f(cbs: List<(Boolean) -> Unit>) {
cbs[0](true)
}
fun main() {
f(listOf({ <caret>_ -> println("hello") }))
}