KT-11733 Cannot infer type parameter in SAM with nullability annotations

#KT-11733 Fixed
This commit is contained in:
Stanislav Erokhin
2016-04-01 20:55:59 +03:00
parent c6fe1b715d
commit 832f468b13
6 changed files with 68 additions and 1 deletions
@@ -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>) {}