KT-11733 Cannot infer type parameter in SAM with nullability annotations
#KT-11733 Fixed
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Predicate.java
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public interface Predicate<T extends CharSequence> {
|
||||
// Same effect with @Nullable here
|
||||
boolean invoke(@NotNull T t);
|
||||
}
|
||||
// FILE: Main.kt
|
||||
fun process(<!UNUSED_PARAMETER!>x<!>: Predicate<String>) {}
|
||||
fun main(args: Array<String>) {
|
||||
process(Predicate { x -> x checkType { _<String>() }
|
||||
true
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user