Redundant lambda arrow: do not report on type parameter
#KT-28131 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8fbf1ed683
commit
4ffeff5e6c
@@ -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") }))
|
||||
}
|
||||
Reference in New Issue
Block a user