Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/publicApproximation/twoIntersections.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

25 lines
555 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
// NI_EXPECTED_FILE
interface Base {
fun base() {}
}
interface Base2 : Base3
interface Base3
interface One : Base, Base2
interface Two : Base, Base2
interface Three : Base, Base3
object O1 : One
object O2 : Two
object O3 : Three
fun <S: Base> intersect(vararg elements: S): S = TODO()
fun <S> intersectNoBound(vararg elements: S): S = TODO()
fun some(a: One, b: Two, c: Three) = intersectNoBound(intersect(a, b), c)
fun test(arg: Base, arg2: Base) {
some(O1, O2, O3).<!UNRESOLVED_REFERENCE{NI}!>base<!>()
}