Add tests for obsolete issues
#KT-38804 Obsolete #KT-38801 Obsolete #KT-38835 Obsolete #KT-38737 Obsolete #KT-38664 Obsolete #KT-38549 Obsolete #KT-38766 Obsolete #KT-38714 Obsolete
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
abstract class MainActivity : DIAware1() {
|
||||
val bar: Bar by instance1()
|
||||
}
|
||||
|
||||
class Bar
|
||||
|
||||
open class DIAware1 {
|
||||
inline fun <reified T : Any> DIAware1.instance1(tag: Any? = null): DIProperty<T> = TODO()
|
||||
}
|
||||
|
||||
class DIProperty<out V> : LazyDelegate<V> {
|
||||
override fun provideDelegate(receiver: Any?, prop: KProperty<Any?>): Lazy<V> = TODO()
|
||||
}
|
||||
|
||||
interface LazyDelegate<out V> {
|
||||
operator fun provideDelegate(receiver: Any?, prop: KProperty<Any?>): Lazy<V>
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
abstract class MainActivity : DIAware1() {
|
||||
val bar: Bar by <!DEBUG_INFO_LEAKING_THIS!>instance1<!>()
|
||||
}
|
||||
|
||||
class Bar
|
||||
|
||||
open class DIAware1 {
|
||||
inline fun <reified T : Any> DIAware1.instance1(tag: Any? = null): DIProperty<T> = TODO()
|
||||
}
|
||||
|
||||
class DIProperty<out V> : LazyDelegate<V> {
|
||||
override fun provideDelegate(receiver: Any?, prop: KProperty<Any?>): Lazy<V> = TODO()
|
||||
}
|
||||
|
||||
interface LazyDelegate<out V> {
|
||||
operator fun provideDelegate(receiver: Any?, prop: KProperty<Any?>): Lazy<V>
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package
|
||||
|
||||
public final class Bar {
|
||||
public constructor Bar()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class DIAware1 {
|
||||
public constructor DIAware1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final inline fun </*0*/ reified T : kotlin.Any> DIAware1.instance1(/*0*/ tag: kotlin.Any? = ...): DIProperty<T>
|
||||
}
|
||||
|
||||
public final class DIProperty</*0*/ out V> : LazyDelegate<V> {
|
||||
public constructor DIProperty</*0*/ out V>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun provideDelegate(/*0*/ receiver: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<kotlin.Any?>): kotlin.Lazy<V>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface LazyDelegate</*0*/ out V> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract operator fun provideDelegate(/*0*/ receiver: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<kotlin.Any?>): kotlin.Lazy<V>
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class MainActivity : DIAware1 {
|
||||
public constructor MainActivity()
|
||||
public final val bar: Bar
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final override /*1*/ inline /*fake_override*/ fun </*0*/ reified T : kotlin.Any> DIAware1.instance1(/*0*/ tag: kotlin.Any? = ...): DIProperty<T>
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun test(b: TestRepo) {
|
||||
coEvery1 { b.save(any()) }
|
||||
}
|
||||
|
||||
fun <T> coEvery1(stubBlock: suspend MockKMatcherScope.() -> T) {}
|
||||
|
||||
class MockKMatcherScope {
|
||||
inline fun <reified T : Any> any(): T = TODO()
|
||||
}
|
||||
|
||||
class TestRepo : CrudRepository<Int, String>
|
||||
|
||||
interface CrudRepository<T, K> {
|
||||
fun <S : T?> save(entity: S): S = TODO()
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> coEvery1(/*0*/ stubBlock: suspend MockKMatcherScope.() -> T): kotlin.Unit
|
||||
public fun test(/*0*/ b: TestRepo): kotlin.Unit
|
||||
|
||||
public interface CrudRepository</*0*/ T, /*1*/ K> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun </*0*/ S : T?> save(/*0*/ entity: S): S
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class MockKMatcherScope {
|
||||
public constructor MockKMatcherScope()
|
||||
public final inline fun </*0*/ reified T : kotlin.Any> any(): T
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class TestRepo : CrudRepository<kotlin.Int, kotlin.String> {
|
||||
public constructor TestRepo()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun </*0*/ S : kotlin.Int?> save(/*0*/ entity: S): S
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Inv<T>
|
||||
|
||||
fun <T> foo(f: () -> T): Inv<T> = TODO()
|
||||
|
||||
fun myExit(): Nothing = TODO()
|
||||
|
||||
fun test(x: String?): Inv<String> {
|
||||
return foo {
|
||||
if (x == null) myExit()
|
||||
x
|
||||
}
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class Inv<T>
|
||||
|
||||
fun <T> foo(f: () -> T): Inv<T> = TODO()
|
||||
|
||||
fun myExit(): Nothing = TODO()
|
||||
|
||||
fun test(x: String?): Inv<String> {
|
||||
return foo {
|
||||
if (x == null) myExit()
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> foo(/*0*/ f: () -> T): Inv<T>
|
||||
public fun myExit(): kotlin.Nothing
|
||||
public fun test(/*0*/ x: kotlin.String?): Inv<kotlin.String>
|
||||
|
||||
public final class Inv</*0*/ T> {
|
||||
public constructor Inv</*0*/ T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user