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)
29 lines
441 B
Kotlin
Vendored
29 lines
441 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
|
package test
|
|
|
|
object Wrong
|
|
object Right
|
|
|
|
class a {
|
|
class b<T> {
|
|
class c {
|
|
fun foo() = Wrong
|
|
}
|
|
}
|
|
}
|
|
|
|
fun Int.foo() = Right
|
|
|
|
class Test {
|
|
val a: List<Int> = null!!
|
|
|
|
val <T> List<T>.b: Int get() = 42
|
|
|
|
val Int.c: Int get() = 42
|
|
|
|
val test1: () -> Right = a.b<Int>.c::foo
|
|
val test1a: () -> Right = a.b.c::foo
|
|
|
|
val test2: () -> Right = a.b<Int>.c?::foo
|
|
}
|