[FIR-TEST] Move analysis tests to separate module
This commit is contained in:
@@ -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?>>() }
|
||||
}
|
||||
Reference in New Issue
Block a user