Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolveWithStdlib/functionX.kt
T
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00

12 lines
349 B
Kotlin
Vendored

// WITH_EXTENDED_CHECKERS
import <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>kotlin.jvm.functions.Function0<!>
val x: <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>Function0<Int><!> = <!INITIALIZER_TYPE_MISMATCH!>{ 42 }<!>
val y: Function1<String, String> = { it }
class MyFunction : Function2<Int, String, Unit> {
override fun invoke(p1: Int, p2: String) {}
}