e6b5cb5216
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
36 lines
572 B
Kotlin
Vendored
36 lines
572 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !CHECK_TYPE
|
|
|
|
package s
|
|
|
|
import checkSubtype
|
|
|
|
interface In<in T>
|
|
|
|
interface A
|
|
interface B
|
|
interface C: A, B
|
|
|
|
fun <T> foo(in1: In<T>, in2: In<T>): T = throw Exception("$in1 $in2")
|
|
|
|
fun test(inA: In<A>, inB: In<B>, inC: In<C>) {
|
|
|
|
<!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS{OI}!>foo<!>(inA, inB)
|
|
|
|
val r = foo(inA, inC)
|
|
checkSubtype<C>(r)
|
|
|
|
val c: C = foo(inA, inB)
|
|
|
|
use(c)
|
|
}
|
|
|
|
fun <T: C> bar(in1: In<T>): T = throw Exception("$in1")
|
|
|
|
fun test(inA: In<A>) {
|
|
val r = bar(inA)
|
|
checkSubtype<C>(r)
|
|
}
|
|
|
|
fun use(vararg a: Any?) = a
|