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
66 lines
1.3 KiB
Kotlin
Vendored
66 lines
1.3 KiB
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
|
|
|
fun interface KRunnable {
|
|
fun invoke()
|
|
}
|
|
|
|
object Test1 {
|
|
fun foo(x: Any) {}
|
|
fun foo(f: () -> Unit) {}
|
|
|
|
object Scope {
|
|
fun foo(r: KRunnable) {}
|
|
|
|
fun test(f: () -> Unit) {
|
|
<!DEBUG_INFO_CALL("fqName: Test1.Scope.foo; typeCall: function")!>foo(f)<!>
|
|
}
|
|
}
|
|
}
|
|
|
|
object Test2 {
|
|
fun foo(f: () -> String) {}
|
|
|
|
object Scope {
|
|
fun foo(r: KRunnable) {}
|
|
|
|
fun test(f: () -> Unit) {
|
|
<!DEBUG_INFO_CALL("fqName: Test2.Scope.foo; typeCall: function")!>foo(f)<!>
|
|
}
|
|
}
|
|
}
|
|
|
|
object Test3 {
|
|
fun foo(i: Int, r: KRunnable): Int = 0
|
|
fun foo(n: Number, f: () -> Unit): String = ""
|
|
|
|
fun test(f: () -> Unit) {
|
|
val result = foo(1, f)
|
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
|
|
}
|
|
}
|
|
|
|
object Test4 {
|
|
fun foo(i: Int, r: KRunnable): Int = 0
|
|
fun foo(n: Number, f: () -> Unit): String = ""
|
|
|
|
fun bar() {}
|
|
|
|
fun test() {
|
|
val result = foo(1, ::bar)
|
|
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
|
|
}
|
|
}
|
|
|
|
object Test5 {
|
|
fun foo(x: Any) {}
|
|
fun foo(f: () -> Unit) {}
|
|
|
|
object Scope {
|
|
fun foo(r: KRunnable) {}
|
|
|
|
fun test() {
|
|
<!DEBUG_INFO_CALL("fqName: Test5.Scope.foo; typeCall: function")!>foo { }<!>
|
|
}
|
|
}
|
|
}
|