K2: Fix false-negative RETURN_TYPE_MISMATCH
^KT-53987 Fixed ^KT-55932 Fixed
This commit is contained in:
committed by
Space Team
parent
d7399ed1cf
commit
9fa0f51a61
+1
-1
@@ -20,7 +20,7 @@ FILE: basic.kt
|
||||
^okOneLineFunction Int(10).R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
public final fun errorOneLineFunction(): R|kotlin/String| {
|
||||
^errorOneLineFunction Int(10).R|kotlin/Int.plus<CS errors: kotlin/Int.plus>#|(Int(1))
|
||||
^errorOneLineFunction Int(10).R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// bug: type of the expression in return statement is Char
|
||||
fun illegalReturnIf(): Char {
|
||||
return if (1 < 2) 'a' else { 1 }
|
||||
return <!RETURN_TYPE_MISMATCH!>if (1 < 2) 'a' else { 1 }<!>
|
||||
}
|
||||
|
||||
fun foo(): String {
|
||||
|
||||
Reference in New Issue
Block a user