2ecba6ac39
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)
37 lines
808 B
Kotlin
Vendored
37 lines
808 B
Kotlin
Vendored
// See KT-15566
|
|
// NI_EXPECTED_FILE
|
|
|
|
import DefaultHttpClient.client
|
|
|
|
interface HttpClient
|
|
|
|
class HttpClientImpl : HttpClient
|
|
|
|
// Below we should have initialization error for both (!) delegates
|
|
|
|
object DefaultHttpClient : HttpClient by client {
|
|
val client = HttpClientImpl()
|
|
}
|
|
|
|
object DefaultHttpClientWithGetter : HttpClient by client {
|
|
val client get() = HttpClientImpl()
|
|
}
|
|
|
|
object DefaultHttpClientWithFun : HttpClient by fClient() {
|
|
}
|
|
|
|
private fun fClient() = HttpClientImpl()
|
|
|
|
private fun <T> lazy(init: () -> T): <!UNRESOLVED_REFERENCE!>kotlin.Lazy<T><!> {
|
|
init()
|
|
null!!
|
|
}
|
|
|
|
object DefaultHttpClientWithBy : HttpClient by client {
|
|
val client by lazy { HttpClientImpl() }
|
|
}
|
|
|
|
object DefaultFqHttpClient : HttpClient by DefaultFqHttpClient.client {
|
|
val client = HttpClientImpl()
|
|
}
|