[FIR] Use Function<R> as super type for all FunctionNtypes

This commit is contained in:
Dmitriy Novozhilov
2020-01-24 11:35:37 +03:00
parent 099d737e86
commit 7d8363d6aa
37 changed files with 57 additions and 47 deletions
@@ -15,23 +15,23 @@ fun foo(y: Boolean) {
inline fun case1(block: () -> Unit) {
val contracts = listOf(
contract {
<!INAPPLICABLE_CANDIDATE!>callsInPlace<!>(block, InvocationKind.EXACTLY_ONCE)
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}, contract {
<!INAPPLICABLE_CANDIDATE!>callsInPlace<!>(block, InvocationKind.EXACTLY_ONCE)
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
)
block()
}
inline fun case_2(block: () -> Unit) = contract {
<!INAPPLICABLE_CANDIDATE!>callsInPlace<!>(block, InvocationKind.EXACTLY_ONCE)
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
fun case_3(block: () -> Unit) {
class Class {
fun innerFun(block2: () -> Unit) {
contract {
<!INAPPLICABLE_CANDIDATE!>callsInPlace<!>(block2, InvocationKind.EXACTLY_ONCE)
callsInPlace(block2, InvocationKind.EXACTLY_ONCE)
}
block2()
}