[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,11 @@
// !API_VERSION: 1.0
@SinceKotlin("1.1")
annotation class Anno1(val s: String)
annotation class Anno2 @SinceKotlin("1.1") constructor()
@Anno1("")
@Anno2
fun t1() {}
@@ -0,0 +1,23 @@
// !API_VERSION: 1.0
@SinceKotlin("1.1")
open class Foo
class Bar @SinceKotlin("1.1") constructor()
@SinceKotlin("1.0")
class Baz @SinceKotlin("1.1") constructor()
@SinceKotlin("1.1")
class Quux @SinceKotlin("1.0") constructor()
fun t1(): Foo = Foo()
// TODO: do not report API_NOT_AVAILABLE twice
fun t2() = object : Foo() {}
fun t3(): Bar? = Bar()
fun t4(): Baz = Baz()
fun t5(): Quux = Quux()
@@ -0,0 +1,34 @@
// !API_VERSION: 1.0
// FILE: J.java
public interface J {
void foo();
}
// FILE: test.kt
interface I10 {
@SinceKotlin("1.0")
fun foo()
}
interface I11 {
@SinceKotlin("1.1")
fun foo()
}
fun f1(x: I10) = x.foo()
fun f2(x: I11) = x.foo()
fun f3(x: J) = x.foo()
interface BothI1 : I10, I11
fun f4(x: BothI1) = x.foo()
interface BothI2 : I11, I10
fun f5(x: BothI2) = x.foo()
interface JAndI10 : J, I10
fun f6(x: JAndI10) = x.foo()
interface JAndI11 : J, I11
fun f7(x: JAndI11) = x.foo()
@@ -0,0 +1,48 @@
// !API_VERSION: 1.0
val v1: String
@SinceKotlin("1.1")
get() = ""
@SinceKotlin("1.1")
val v2 = ""
var v3: String
@SinceKotlin("1.1")
get() = ""
set(value) {}
var v4: String
get() = ""
@SinceKotlin("1.1")
set(value) {}
var v5: String
@SinceKotlin("1.1")
get() = ""
@SinceKotlin("1.1")
set(value) {}
@SinceKotlin("1.1")
var v6: String
get() = ""
set(value) {}
@SinceKotlin("1.0")
val v7: String
@SinceKotlin("1.1")
get() = ""
fun test() {
v1
v2
v3
v3 = ""
v4
v4 = ""
v5
v5 = ""
v6
v6 = ""
v7
}
@@ -0,0 +1,19 @@
// !API_VERSION: 1.0
@SinceKotlin("1.1")
fun f() {}
@SinceKotlin("1.1")
var p = Unit
@SinceKotlin("1.1.2")
fun z() {}
fun t1() = f()
fun t2() = p
fun t3() { p = Unit }
fun t4() { z() }
@@ -0,0 +1,18 @@
// !API_VERSION: 1.1
@SinceKotlin("0.9")
fun ok1() {}
@SinceKotlin("1.0")
fun ok2() {}
@SinceKotlin("1.1")
fun ok3() {}
@SinceKotlin("0.9.9")
fun ok4() {}
fun t1() = ok1()
fun t2() = ok2()
fun t3() = ok3()
fun t4() = ok4()
@@ -0,0 +1,15 @@
// !API_VERSION: 1.0
class C {
@SinceKotlin("1.1")
companion object {
val x = 42
}
}
typealias CA = C
val test1 = CA
val test2 = CA.<!UNRESOLVED_REFERENCE!>Companion<!>
val test3 = CA.<!UNRESOLVED_REFERENCE!>x<!>
val test4 = CA.<!UNRESOLVED_REFERENCE!>Companion<!>.<!UNRESOLVED_REFERENCE!>x<!>
@@ -0,0 +1,20 @@
// !API_VERSION: 1.0
@SinceKotlin("1.1")
open class C1
typealias C1_Alias = C1
open class C2(val x: Int) {
@SinceKotlin("1.1")
constructor() : this(0)
}
typealias C2_Alias = C2
val test1 = C1_Alias()
val test2 = C2_Alias()
class Test3 : C1_Alias()
class Test4 : C2_Alias()
@@ -0,0 +1,11 @@
// !API_VERSION: 1.0
@SinceKotlin("1.1")
object Since_1_1 {
val x = 42
}
typealias Since_1_1_Alias = Since_1_1
val test1 = Since_1_1_Alias
val test2 = Since_1_1_Alias.<!UNRESOLVED_REFERENCE!>x<!>
@@ -0,0 +1,21 @@
// !API_VERSION: 1.0
@SinceKotlin("1.1")
class Since_1_1
class C
typealias Since_1_1_Alias = Since_1_1
typealias L = List<Since_1_1>
@SinceKotlin("1.1")
typealias C_1_1_Alias = C
fun test1(x: Since_1_1_Alias) = x
fun test2(x: C_1_1_Alias) = x
fun test3(x: List<C_1_1_Alias>) = x
fun test4(x: L) = x
@@ -0,0 +1,18 @@
// !API_VERSION: 1.0
// FILE: a.kt
package a
@SinceKotlin("1.1")
class Since_1_1
typealias Since_1_1_Alias = Since_1_1
@SinceKotlin("1.1")
typealias Alias_1_1 = String
// FILE: b.kt
package b
import a.Since_1_1_Alias
import a.Alias_1_1