Introduce FirFunctionReturnTypeMismatchChecker
This commit is contained in:
+1
-1
@@ -3,5 +3,5 @@
|
||||
fun calc(x: List<String>?, y: Int?): Int {
|
||||
x?.subList(y!! - 1, y)
|
||||
// y!! above should not provide smart cast here
|
||||
return y
|
||||
return <!RETURN_TYPE_MISMATCH!>y<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ fun calc(x: String?, y: Int?): Int {
|
||||
// Smart cast because of x!! in receiver
|
||||
foo(x!!)?.subSequence(y!!, x.length)?.length
|
||||
// No smart cast possible
|
||||
return y
|
||||
return <!RETURN_TYPE_MISMATCH!>y<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user