e6b5cb5216
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
44 lines
988 B
Kotlin
Vendored
44 lines
988 B
Kotlin
Vendored
// !LANGUAGE: +SuspendConversion
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
|
|
|
object Test1 {
|
|
fun foo(f: () -> Unit) {}
|
|
|
|
object Scope {
|
|
fun foo(f: suspend () -> Unit) {}
|
|
|
|
fun test(g: () -> Unit) {
|
|
<!DEBUG_INFO_CALL("fqName: Test1.foo; typeCall: function")!><!COMPATIBILITY_WARNING!>foo<!>(g)<!>
|
|
}
|
|
}
|
|
}
|
|
|
|
object Test2 {
|
|
fun <T> foo(f: suspend () -> T): T = TODO()
|
|
suspend fun bar(): Int = 0
|
|
|
|
object Scope {
|
|
fun bar(): String = ""
|
|
|
|
fun test() {
|
|
val result = foo(<!COMPATIBILITY_WARNING!>::bar<!>)
|
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
|
|
}
|
|
}
|
|
}
|
|
|
|
object Test3 {
|
|
fun <T> foo(f: suspend () -> T): T = TODO()
|
|
|
|
suspend fun bar(x: Int = 42): Int = 0
|
|
|
|
object Scope {
|
|
fun bar(x: Int = 42): String = ""
|
|
|
|
fun test() {
|
|
val result = foo(::bar)
|
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
|
|
}
|
|
}
|
|
}
|