[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,5 @@
fun <E> List<*>.toArray(ar: Array<E>): Array<E> = ar
fun testArrays(ci : List<Int>) {
ci.toArray<Int>(<!UNRESOLVED_REFERENCE!>x<!>)
}
@@ -0,0 +1,8 @@
package h
public class MyClass<S, T>(param: MyClass<S, T>) {
fun test() {
val result: MyClass<Any, Any>? = null
MyClass<S, Any>(result as MyClass<S, Any>)
}
}
@@ -0,0 +1,25 @@
// !WITH_NEW_INFERENCE
// !CHECK_TYPE
interface A<R, T: A<R, T>> {
fun r(): R
fun t(): T
}
fun testA(a: A<*, *>) {
a.r().checkType { _<Any?>() }
a.t().checkType { <!INAPPLICABLE_CANDIDATE!>_<!><A<*, *>>() }
}
interface B<R, T: B<List<R>, T>> {
fun r(): R
fun t(): T
}
fun testB(b: B<*, *>) {
b.r().checkType { _<Any?>() }
b.t().checkType { <!INAPPLICABLE_CANDIDATE!>_<!><B<List<*>, *>>() }
b.t().r().size
}
@@ -0,0 +1,19 @@
// !WITH_NEW_INFERENCE
// FILE: foo.kt
package foo
fun <T> f(l: List<T>) {}
// FILE: bar.kt
package bar
fun <T> f(l: List<T>) {}
// FILE: main.kt
import foo.*
import bar.*
fun <T> test(l: List<T>) {
<!AMBIGUITY!>f<!>(l)
}
@@ -0,0 +1,9 @@
// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS -UNUSED_PARAMETER
fun <T> f1(l: List1<T>): T {throw Exception()} // ERROR type here
fun <T> f1(l: List2<T>): T {throw Exception()} // ERROR type here
fun <T> f1(c: Collection<T>): T{throw Exception()}
fun <T> test(l: List<T>) {
f1(l)
}