[FIR-TEST] Move analysis tests to separate module

This commit is contained in:
Dmitriy Novozhilov
2020-03-18 15:10:46 +03:00
parent 3a479d5d16
commit cc07ae96b3
1477 changed files with 1001 additions and 980 deletions
@@ -0,0 +1,40 @@
// !CHECK_TYPE
// ISSUE: KT-37070
class KotlinClass(private val name: String) : Comparable<KotlinClass> {
override operator fun compareTo(that: KotlinClass): Int {
return name.compareTo(that.name)
}
}
// TESTCASE NUMBER: 1
fun case1(kotlinClass: KotlinClass?) {
val value = kotlinClass?.let {
it
}
value.checkType { _<KotlinClass?>() }
val lambda = kotlinClass?.let {
{it}
}
lambda.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Unit, KotlinClass?>>() }
}
// TESTCASE NUMBER: 2
fun case2(kotlinClass: KotlinClass) {
val value = kotlinClass.let {
it
}
value.checkType { _<KotlinClass>() }
val lambda = kotlinClass.let {
{it}
}
lambda.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Unit, KotlinClass?>>() }
}