[FIR] Fix false positive "return required" for if/else with inlined return in branch
^KT-49289 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
5b10396f48
commit
744191099c
@@ -0,0 +1,20 @@
|
||||
// FIR_IDENTICAL
|
||||
// https://youtrack.jetbrains.com/issue/KT-49289
|
||||
|
||||
inline fun <T> myRun(f: () -> T): T = f()
|
||||
|
||||
fun foo(): Int {
|
||||
myRun {
|
||||
return 24
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(arg: Boolean): Int {
|
||||
if (arg) {
|
||||
return 42
|
||||
} else {
|
||||
myRun {
|
||||
return 24
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun bar(/*0*/ arg: kotlin.Boolean): kotlin.Int
|
||||
public fun foo(): kotlin.Int
|
||||
public inline fun </*0*/ T> myRun(/*0*/ f: () -> T): T
|
||||
Reference in New Issue
Block a user