Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt
T
Dmitriy Novozhilov e6b5cb5216 [TD] Update diagnostics test data due to new test runners
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
2020-12-16 19:52:25 +03:00

31 lines
540 B
Kotlin
Vendored

// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
import kotlin.reflect.KFunction1
open class A {
open fun bar() {}
fun bas() {}
}
class B: A() {
override fun bar() {}
fun bas(i: Int) {}
}
fun A.foo() {}
fun B.foo() {}
fun fas() {}
fun fas(i: Int = 1) {}
fun test() {
B::foo // todo KT-9601 Chose maximally specific function in callable reference
B::bar checkType { _<KFunction1<B, Unit>>() }
B::<!OVERLOAD_RESOLUTION_AMBIGUITY!>bas<!>
::<!OVERLOAD_RESOLUTION_AMBIGUITY!>fas<!>
}