KT-11733 Cannot infer type parameter in SAM with nullability annotations
#KT-11733 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
interface Predicate<T>
|
||||
|
||||
fun <T> Predicate(<!UNUSED_PARAMETER!>x<!>: (T?) -> Boolean): Predicate<T> = null!!
|
||||
|
||||
fun foo() {
|
||||
process(Predicate {
|
||||
x -> x checkType { _<String?>() }
|
||||
|
||||
true
|
||||
})
|
||||
}
|
||||
|
||||
fun process(<!UNUSED_PARAMETER!>x<!>: Predicate<String>) {}
|
||||
Reference in New Issue
Block a user