[Test] Add test for KT-35314
This commit is contained in:
committed by
Space Team
parent
5d6328a706
commit
38533977f0
+1
@@ -0,0 +1 @@
|
||||
java.lang.StackOverflowError
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-35314
|
||||
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.InvocationKind
|
||||
import kotlin.contracts.contract
|
||||
|
||||
class Foo {
|
||||
fun bar() {
|
||||
try {
|
||||
myLet {
|
||||
if (false) {
|
||||
return
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
inline fun myLet(block: () -> Unit) {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return block()
|
||||
}
|
||||
Reference in New Issue
Block a user