Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.fir.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

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
}