Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

14 lines
648 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
object CommonCase {
interface Fas<D, E, R>
fun <D, E, R> delegate() : Fas<D, E, R> = TODO()
operator fun <D, E, R> Fas<D, E, R>.provideDelegate(host: D, p: Any?): Fas<D, E, R> = TODO()
operator fun <D, E, R> Fas<D, E, R>.getValue(receiver: E, p: Any?): R = TODO()
val Long.test1: String by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE{NI}!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>delegate<!>()<!> // common test, not working because of Inference1
val Long.test2: String by delegate<CommonCase, Long, String>() // should work
}