[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,56 @@
// !WITH_NEW_INFERENCE
open class Final {
fun foo() {}
val bar: Int = 0
var qux: Int = 0
}
open class Derived : Final()
interface IFoo {
fun foo()
}
class CFoo : IFoo {
override fun foo() {}
}
interface IBar {
val bar: Int
}
class CBar : IBar {
override val bar: Int get() = 0
}
interface IQux {
val qux: Int
}
class CQux : IQux {
override val qux: Int get() = 0
}
interface IBarT<T> {
val bar: T
}
class CBarT<T> : IBarT<T> {
override val bar: T get() = null!!
}
class Test1 : Final(), IFoo by CFoo()
class Test2 : Final(), IBar by CBar()
class Test3 : Final(), IQux by CQux()
class Test4 : Derived(), IFoo by CFoo()
class Test5 : Derived(), IBar by CBar()
class Test6 : Derived(), IQux by CQux()
class Test7 : Final(), IBarT<Int> by CBarT<Int>()
class Test8 : Final(), IBarT<Int> by CBar()
@@ -0,0 +1,57 @@
interface IStr {
val foo: String
}
class CStr : IStr {
override val foo: String get() = ""
}
interface IInt {
val foo: Int
}
class CInt : IInt {
override val foo: Int get() = 42
}
interface IAny {
val foo: Any
}
class CAny : IAny {
override val foo: Any get() = null!!
}
interface IGeneric<T> {
val foo: T
}
class CGeneric<T> : IGeneric<T> {
override val foo: T get() = null!!
}
abstract class Test1 : IStr by CStr(), IInt
abstract class Test2 : IStr, IInt by CInt()
abstract class Test3 : IStr by CStr(), IInt by CInt()
abstract class Test4 : IStr by CStr(), IGeneric<String>
abstract class Test5 : IStr by CStr(), IGeneric<Any>
abstract class Test6 : IStr by CStr(), IGeneric<Int>
abstract class Test7 : IGeneric<String> by CGeneric<String>(), IStr
abstract class Test8 : IGeneric<String> by CGeneric<String>(), IInt
// Can't test right now due to https://youtrack.jetbrains.com/issue/KT-10258
// abstract class Test9 : IGeneric<String> by CGeneric<String>(), IGeneric<Int>
abstract class Test10 : IInt by CInt(), IStr by CStr(), IAny by CAny()
abstract class Test11 : IInt, IStr by CStr(), IAny by CAny()
abstract class Test12 : IInt, IStr, IAny by CAny()
@@ -0,0 +1,59 @@
interface IStr {
fun foo(): String
}
class CStr : IStr {
override fun foo(): String = ""
}
interface IInt {
fun foo(): Int
}
class CInt : IInt {
override fun foo(): Int = 42
}
interface IAny {
fun foo(): Any
}
class CAny : IAny {
override fun foo(): Any = null!!
}
interface IGeneric<T> {
fun foo(): T
}
class CGeneric<T> : IGeneric<T> {
override fun foo(): T {
throw UnsupportedOperationException()
}
}
abstract class Test1 : IStr by CStr(), IInt
abstract class Test2 : IStr, IInt by CInt()
abstract class Test3 : IStr by CStr(), IInt by CInt()
abstract class Test4 : IStr by CStr(), IGeneric<String>
abstract class Test5 : IStr by CStr(), IGeneric<Any>
abstract class Test6 : IStr by CStr(), IGeneric<Int>
abstract class Test7 : IGeneric<String> by CGeneric<String>(), IStr
abstract class Test8 : IGeneric<String> by CGeneric<String>(), IInt
// Can't test due to https://youtrack.jetbrains.com/issue/KT-10258
// abstract class Test9 : IGeneric<String> by CGeneric<String>(), IGeneric<Int>
abstract class Test10 : IInt by CInt(), IStr by CStr(), IAny by CAny()
abstract class Test11 : IInt, IStr by CStr(), IAny by CAny()
abstract class Test12 : IInt, IStr, IAny by CAny()
@@ -0,0 +1,29 @@
interface IVar {
var foo: Int
}
interface IDerived : IVar
interface IVal {
val foo: Int
}
class CVal : IVal {
override val foo: Int get() = 42
}
interface IValT<T> {
val foo: T
}
class CValT<T> : IValT<T> {
override val foo: T get() = null!!
}
abstract class Test1 : IVar, IVal by CVal()
abstract class Test2 : IVar, IValT<Int> by CValT<Int>()
abstract class Test3 : IDerived, IVal by CVal()
abstract class Test4 : IDerived, IValT<Int> by CValT<Int>()