[FIR] Add constraint to flexible type for declared argument for java parameter

This commit is contained in:
Dmitriy Novozhilov
2020-03-25 18:04:19 +03:00
parent 3acb64c536
commit 48fb279721
24 changed files with 79 additions and 58 deletions
@@ -22,8 +22,7 @@ interface PsiMethod {
interface PsiClass
fun test() {
// TODO: don't forget to implement preservation flexibility of java type parameters in FIR (this is the reason of error here)
val processor = <!INAPPLICABLE_CANDIDATE!>AdapterProcessor<!><PsiMethod, PsiClass>(
val processor = AdapterProcessor<PsiMethod, PsiClass>(
Function { method: PsiMethod? -> method?.containingClass }
)
}
@@ -13,7 +13,7 @@ public class A {
fun test() {
A.bar(null, "")
A.<!INAPPLICABLE_CANDIDATE!>bar<!><String>(null, "")
A.bar<String>(null, "")
A.bar<String?>(null, "")
A.bar(null, A.platformString())
}
@@ -4,6 +4,6 @@ fun foo() {
val list = ArrayList<String?>()
for (s in list) {
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.length
}
}