Introduce FirFunctionReturnTypeMismatchChecker
This commit is contained in:
@@ -15,5 +15,5 @@ public class P {
|
||||
|
||||
fun foo(c: P): MutableList<Int> {
|
||||
// Error should be here: see KT-8168 Typechecker fails for platform collection type
|
||||
return c.getList() ?: listOf()
|
||||
return <!RETURN_TYPE_MISMATCH!>c.getList() ?: listOf()<!>
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import kotlin.comparisons.nullsLast
|
||||
class Foo(val a: String, val b: Int)
|
||||
|
||||
fun getComp(): Comparator<Foo?> =
|
||||
when {
|
||||
<!RETURN_TYPE_MISMATCH!>when {
|
||||
else -> nullsLast(compareBy({ it.<!UNRESOLVED_REFERENCE!>a<!> }, { it.<!UNRESOLVED_REFERENCE!>b<!> }))
|
||||
}
|
||||
}<!>
|
||||
|
||||
fun getCompInverted(): Comparator<Foo?> =
|
||||
nullsLast(
|
||||
|
||||
Reference in New Issue
Block a user