[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,22 @@
// !WITH_NEW_INFERENCE
// FULL_JDK
abstract class A : MutableList<String> {
override fun sort(/*0*/ p0: java.util.Comparator<in String>) {
super.sort(p0)
}
}
fun foo(x: MutableList<String>, y: java.util.ArrayList<String>, z: A, p: java.util.Comparator<in String>) {
x.sort(p)
y.sort(p)
z.sort(p)
}
fun bar(x: MutableList<String>, y: java.util.ArrayList<String>, z: A) {
x.sort { a, b -> a.length - b.length }
y.sort { a, b -> a.length - b.length }
z.sort { a, b -> a.length - b.length }
}
@@ -0,0 +1,66 @@
// !CHECK_TYPE
// !LANGUAGE: -AdditionalBuiltInsMembers
// !WITH_NEW_INFERENCE
// SKIP_TXT
// FULL_JDK
class A : java.util.ArrayList<String>() {
// `stream` is defined in ArrayList, so it was impossible to override it in 1.0
override fun stream(): java.util.stream.Stream<String> = super.stream()
// `sort` is defined in ArrayList, so it was possible to override it in 1.0
override fun sort(c: Comparator<in String>?) {
super.sort(c)
}
}
class A1 : java.util.ArrayList<String>() {
// `stream` is defined in ArrayList, so it was possible to declare it in 1.0 without an 'override' keyword
fun stream(): java.util.stream.Stream<String> = super.stream()
// `sort` is defined in ArrayList, so it was impossible to declare it in 1.0 without an 'override' keyword
fun sort(c: Comparator<in String>?) {
super.sort(c)
}
}
interface A2 : List<String> {
override fun stream(): java.util.stream.Stream<String> = null!!
}
class B : <!INAPPLICABLE_CANDIDATE!>Throwable<!>("", null, false, false)
class B1 : RuntimeException() {
override fun fillInStackTrace(): Throwable { // 'override' keyword must be prohibited, as it was in 1.0.x
return this
}
}
class A3(val x: List<String>) : List<String> by x
fun Throwable.fillInStackTrace() = 1
fun foo(x: List<String>, y: Throwable, z: A3) {
x.stream()
java.util.<!UNRESOLVED_REFERENCE!>ArrayList<!><String>().<!UNRESOLVED_REFERENCE!>stream<!>()
y.fillInStackTrace() checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
HashMap<String, Int>().getOrDefault(Any(), null)
// Falls back to extension in stdlib
y.printStackTrace()
z.stream()
}
interface X {
fun foo(): Int = 1
val hidden: Boolean
}
class Y : X {
// There should not be UNSUPPORTED_FEATURE diagnostic
override fun foo() = 1
override var hidden: Boolean = true
}