Fix inferred type of FirGetClassCall

The inferred type should be `KClass<out Blah>` for `FirGetClassCall`
invoked on expressions.
This commit is contained in:
Tianyu Geng
2021-04-13 17:23:33 -07:00
committed by teamcityserver
parent 7bb81ef157
commit d4717569b9
12 changed files with 23 additions and 189 deletions
@@ -5,7 +5,7 @@ import kotlin.reflect.KClass
class Foo {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other === null || <!EQUALITY_NOT_APPLICABLE!>other::class != this::class<!>) return false
if (other === null || other::class != this::class) return false
return true
}
@@ -47,6 +47,9 @@ fun foo(
aListInt: A<List<Int>>,
aSetInt: A<Set<Int>>,
aListString: A<List<String>>,
mutableListAny: MutableList<Any>,
listString: List<String>,
) {
"a" == "b"
1 == 2
@@ -94,4 +97,6 @@ fun foo(
<!EQUALITY_NOT_APPLICABLE_WARNING!>aString == aListString<!>
<!EQUALITY_NOT_APPLICABLE_WARNING!>bString == aListString<!>
<!EQUALITY_NOT_APPLICABLE_WARNING!>mutableListAny == listString<!>
}
@@ -47,6 +47,9 @@ fun foo(
aListInt: A<List<Int>>,
aSetInt: A<Set<Int>>,
aListString: A<List<String>>,
mutableListAny: MutableList<Any>,
listString: List<String>,
) {
"a" == "b"
1 == 2
@@ -94,4 +97,6 @@ fun foo(
aString == aListString
bString == aListString
mutableListAny == listString
}