Files
kotlin-fork/compiler/testData/diagnostics/tests/AutoCreatedIt.fir.kt
T
2020-04-21 09:48:03 +03:00

34 lines
696 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
fun text() {
"direct:a" to "mock:a"
"direct:a" on {it.body == "<hello/>"} to "mock:a"
"direct:a" on {it -> it.body == "<hello/>"} to "mock:a"
bar {1}
bar {<!UNRESOLVED_REFERENCE!>it<!> + 1}
bar {it, it1 -> it}
bar1 {1}
bar1 {it + 1}
bar2 {}
bar2 {1}
bar2 {<!UNRESOLVED_REFERENCE!>it<!>}
<!INAPPLICABLE_CANDIDATE!>bar2<!> {it -> it}
}
fun bar(f : (Int, Int) -> Int) {}
fun bar1(f : (Int) -> Int) {}
fun bar2(f : () -> Int) {}
infix fun String.to(dest : String) {
}
infix fun String.on(predicate : (s : URI) -> Boolean) : URI {
return URI(this)
}
class URI(val body : Any) {
infix fun to(dest : String) {}
}