Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/labelClashes.fir.kt
T
Denis.Zharkov fe5adab652 K2: Avoid inference diagnostics when arguments are already error typed
For example, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER

It became especially relevant after 0e84bf2053
that together with later commits bring a lot of unnecessary
NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
2023-02-15 08:13:41 +00:00

44 lines
700 B
Kotlin
Vendored

// !RENDER_DIAGNOSTICS_FULL_TEXT
fun Int.with() {
with("") {
this@with.<!UNRESOLVED_REFERENCE!>inc<!>()
}
}
fun Int.bar() {
with("") bar@{
this@bar.<!UNRESOLVED_REFERENCE!>inc<!>()
}
}
fun foo(f: with.() -> Unit) {}
class with {
fun foo() {
with("") {
this@with.<!UNRESOLVED_REFERENCE!>foo<!>()
}
with("") with@{
this@with.<!UNRESOLVED_REFERENCE!>foo<!>()
}
with("") other@{
this@with.foo()
}
}
}
private typealias Extension = TypedThis
class TypedThis {
fun TypedThis.baz() {
this@TypedThis
}
fun Extension.bar() {
this@TypedThis
}
}