[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,31 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Outer {
inner class Test1
inner class Test2(val x: Int)
inner class Test3(val x: Any)
inner class Test4<T>(val x: T)
inner class Test5(val x: Int) {
constructor() : this(0)
private constructor(z: String) : this(z.length)
}
class TestNested
internal class TestInternal
protected class TestProtected
private class TestPrivate
}
fun Outer.Test1() {}
fun Outer.Test2(x: Int) {}
fun Outer.Test3(x: String) {}
fun <T> Outer.Test3(x: T) {}
fun <T : Number> Outer.Test4(x: T) {}
fun Outer.Test5() {}
fun Outer.Test5(z: String) {}
fun Outer.TestNested() {}
fun Outer.TestInternal() {}
fun Outer.TestProtected() {}
fun Outer.TestPrivate() {}
@@ -0,0 +1,32 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Test1 {
fun test1() {}
}
fun Test1.test1() {}
interface Test2 {
fun test2(x: String) {}
}
fun Test2.test2(x: Any) {}
interface Test3 {
fun test3(x: Any) {}
}
fun Test3.test3(x: String) {}
fun <T : Any?> Test3.test3(x: T) {}
interface Test4 {
fun <T> test4(x: T) {}
}
fun Test4.test4(x: String) {}
interface Test5 {
fun <T> test5(x: T) {}
}
fun <T : Number> Test5.test5(x: T) {}
interface Test6 {
fun <T : List<Any>> test6(x: T) {}
}
fun <T : Set<Any>> Test6.test6(x: T) {}
@@ -0,0 +1,18 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface WithInvoke {
operator fun invoke()
operator fun invoke(s: String)
operator fun <T> invoke(x: T, y: Int)
fun invoke(i: Int)
}
interface Test1 {
val test1: WithInvoke
}
fun Test1.test1() {}
fun Test1.test1(s: String) {}
fun Test1.test1(i: Int) {}
fun Test1.test1(x: Any, y: Int) {}
fun <T : Number> Test1.test1(x: T, y: Int) {}
@@ -0,0 +1,5 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class DataClass(val x: Int)
fun DataClass.component1() = 42
@@ -0,0 +1,5 @@
class C {
fun Int.foo() {}
}
fun C.foo() {}
@@ -0,0 +1,7 @@
interface G<T> {
fun foo()
val bar: Int
}
fun G.foo() {}
val G.bar: Int get() = 42
@@ -0,0 +1,7 @@
interface Test {
fun foo()
val bar: Int
}
fun Test?.foo() {}
val Test?.bar: Int get() = 42
@@ -0,0 +1,22 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Test1 {
val test1: Int
}
val Test1.test1: Int get() = 42
interface Test2 {
var test2: Int
}
val Test2.test2: Int get() = 42
interface Test3 {
val test3: Int
}
var Test3.test3: Int get() = 42; set(v) {}
interface Test4 {
val test4: Int
}
var Test4.test4: Int get() = 42; set(v) {}
@@ -0,0 +1,16 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface IBase {
fun foo()
val bar: Int
}
object Impl : IBase {
override fun foo() {}
override val bar: Int get() = 42
}
object Test : IBase by Impl
fun Test.foo() {}
val Test.bar: Int get() = 42
@@ -0,0 +1,47 @@
class WithPublicInvoke {
public operator fun invoke() {}
}
class WithInternalInvoke {
internal operator fun invoke() {}
}
class WithProtectedInvoke {
protected operator fun invoke() {}
}
class WithPrivateInvoke {
private operator fun invoke() {}
}
class Test {
public fun publicFoo() {}
internal fun internalFoo() {}
protected fun protectedFoo() {}
private fun privateFoo() {}
public val publicVal = 42
internal val internalVal = 42
protected val protectedVal = 42
private val privateVal = 42
public val withPublicInvoke = WithPublicInvoke()
public val withInternalInvoke = WithInternalInvoke()
public val withProtectedInvoke = WithProtectedInvoke()
public val withPrivateInvoke = WithPrivateInvoke()
}
private fun Test.publicFoo() {}
fun Test.internalFoo() {}
fun Test.protectedFoo() {}
fun Test.privateFoo() {}
val Test.publicVal: Int get() = 42
val Test.internalVal: Int get() = 42
val Test.protectedVal: Int get() = 42
val Test.privateVal: Int get() = 42
fun Test.withPublicInvoke() {}
fun Test.wihtInternalInvoke() {}
fun Test.withProtectedInvoke() {}
fun Test.withPrivateInvoke() {}
@@ -0,0 +1,7 @@
interface IFoo {
fun foo(i: Int): Int
<!INAPPLICABLE_INFIX_MODIFIER!>infix fun bar(i: Int): Int<!>
}
infix fun IFoo.foo(i: Int) = i
infix fun IFoo.bar(i: Int) = i
@@ -0,0 +1,7 @@
interface IFoo {
fun foo()
}
fun outer() {
fun IFoo.foo() {}
}
@@ -0,0 +1,9 @@
interface IFooBar {
fun foo()
val bar: Int
}
class Host {
fun IFooBar.foo() {}
val IFooBar.bar: Int get() = 42
}
@@ -0,0 +1,7 @@
interface Test {
fun invoke()
operator fun invoke(i: Int): Int
}
operator fun Test.invoke() {}
operator fun Test.invoke(i: Int) = i