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
69 lines
1.4 KiB
Kotlin
Vendored
69 lines
1.4 KiB
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
package a
|
|
|
|
interface A
|
|
|
|
fun <T> emptyList(): List<T> = throw Exception()
|
|
|
|
fun test1() {
|
|
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>emptyList<!>()
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun <T: A> emptyListOfA(): List<T> = throw Exception()
|
|
|
|
fun test2() {
|
|
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>emptyListOfA<!>()
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun <T: A, R: T> emptyStrangeMap(): Map<T, R> = throw Exception()
|
|
|
|
fun test3() {
|
|
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>emptyStrangeMap<!>()
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun <T, R: T> emptyStrangeMap1(t: T): Map<T, R> = throw Exception("$t")
|
|
|
|
fun test4() {
|
|
emptyStrangeMap1(1)
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun <T: A, R> emptyStrangeMap2(t: T): Map<T, R> where R: T = throw Exception("$t")
|
|
|
|
fun test5(a: A) {
|
|
emptyStrangeMap2(a)
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun <T: A, R: T> emptyStrangeMap3(r: R): Map<T, R> = throw Exception("$r")
|
|
|
|
fun test6(a: A) {
|
|
emptyStrangeMap3(a)
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun <T, R: T> emptyStrangeMap4(l: MutableList<T>): Map<T, R> = throw Exception("$l")
|
|
|
|
fun test7(list: MutableList<Int>) {
|
|
emptyStrangeMap4(list)
|
|
}
|
|
|
|
//--------------
|
|
|
|
fun test7() : Map<A, A> = emptyStrangeMap()
|
|
|
|
//--------------
|
|
|
|
fun <U, V: U> foo(): U = throw Exception()
|
|
|
|
fun test8(): Int = foo()
|